1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
zavuch27 [327]
3 years ago
6

Given the String variables name1 and name2, write a fragment of code that assigns the larger of the two to the variable first (a

ssume that all three are already declared and that name1 and name2 have been assigned values). (Note: "larger" here means alphabetically larger, not "longer". Thus, "mouse" is larger than "elephant" because "mouse" comes later in the dictionary than "elephant"!)
Computers and Technology
1 answer:
Neporo4naja [7]3 years ago
6 0

Answer:

if ( name1 > name2) {

    first = name1;

} else {

    first = name2;

}

Explanation:

First you need take a decision for that reason you need and if - else structure to decide if asign the variable name1 or the variable name2 to the result. Later you can use an > or < to compare two strings because it use the ASCII code to compare wich one is larger than another.

if ( name1 > name2) {

    first = name1;

} else {

    first = name2;

}

You might be interested in
What is the full form of EPROM (CLASS-6)
vodomira [7]

Answer:

earth planet rest orbit moon

4 0
2 years ago
Read 2 more answers
Suppose you are given a sequence that is described by a formula, starting at index n=0. If you need to change the starting index
Arisa [49]

Answer:

n+1

Explanation:

Given

n = 0 --- starting index

Required

Change the starting index to n = 1

We have:

n = 0

To change the starting index to k, we simply rewrite as:

n+k

<em>In this case; k=1; so, the starting index will be: </em>n+1<em />

3 0
3 years ago
Which statement best describes the problem statement below?
Vinil7 [7]

Answer:

dont click on his link it has virus

6 0
3 years ago
Identify the device used to convert an information signal to a signal compatible with the medium over which it is being transmit
seropon [69]

Answer:

A modulator

Explanation:

This device is called a modulator and it does the task of modulation. The act of modulation influences data information on the carrier, allowing signal to be sent over a bandpass frequency range.

The Modulator is what controls an input audio signal which is called a carrier. It does not make a sound. What it does instead is to change the original carrier sound wave. The work of the Modulator as evident in the question is the conversion of information signal to a signal compatible with the medium over which it is going to be transmitted.

7 0
2 years ago
Write structured pseudocode to show the following: when you are on time for work you have time to buy coffee
faltersainse [42]

Answer:

If( on_time == True) {

     print("Coffee")

} else {

    print("No Coffee")

}

Explanation:

Step 1 evaluate with a boolean variable if you are on time

If( on_time == True) {

Step 2 if true you have coffee

print("Coffee")

Step 3 if false you have not coffee

print("No Coffee")

3 0
3 years ago
Other questions:
  • Customer A with a Bronze service level package calls in a Critical System Failure at 9:00 AM. Customer B with a Silver service l
    15·1 answer
  • Jax needs to write a block of code that will organize a list of items alphabetically. Which function should he use? append() pri
    12·1 answer
  • Indicate the proper order (1-4) of the following PR strategic planning 4-step process. 1 Defining the problem 2 Evaluating the p
    10·1 answer
  • Enter the cube's edge: 4<br> The surface area is 96 square units.<br> Python
    12·1 answer
  • Problem 3. Consider the following recurrence, defined for n a power of 4 (for the time of some algorithm): T(n) = 3 if n = 1 2T(
    5·1 answer
  • Data types influence the following in the workflow: (Select all that apply)a. the color choices and layout decisions around comp
    15·2 answers
  • Which of the following Web sites would be MOST credible?
    6·1 answer
  • Two types of formulas in Excel, what are they? A. Complex and simple, B. General and currency, C. Logical and Boolean, D. Trig a
    15·1 answer
  • What is the purpose of the Excel Function Reference?
    9·1 answer
  • The NVCC college professor receives frequent emails disguised as official business emails. They may be requests to reset a passw
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!