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
ipn [44]
2 years ago
12

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).
Computers and Technology
1 answer:
ArbitrLikvidat [17]2 years ago
3 0
To screw with your teacher:

first = (name1 > name2 ) ? name1 : name2;

That code is correct, but your teacher is probably looking for:

if( name1 > name2 )
    first = name1;
else
    first = name2;

I love the ternary operator!

You might be interested in
What is heaven backwards?
sweet-ann [11.9K]
It is Nevaeh backwards hope that helps! :3 and feel free to pm me if you have anymore questions! :3
5 0
2 years ago
Read 2 more answers
What is a coverage map used for
erastova [34]

Answer/Explanation:

A coverage map shows how much land something takes up or reaches to.

4 0
2 years ago
Read 2 more answers
To share a server folder, access the ____ tab in the folder properties dialog box and click the share button (or from the window
anygoal [31]
Oh lord I have no idea :/ I suck at this yeah idk
5 0
2 years ago
Pls answer 10 points ​
AlekseyPX

Answer:

1. C

5.b

Explanation:

1. Is c because it is in the short cut key

5. Is B because it is the last choice

3 0
2 years ago
Read 2 more answers
Which of these is not a sub-claim "Our Clean Power Plan" uses to support its main claim? The CPP protects public health. The CPP
Leno4ka [110]
The CPP cleans the air statement is not a sub-claim of Our Clean Power Plan.

It is the efforts of President Barrack Obama and the U.S. Environmental Protection Agency that has the main goal of lessening to cutting carbon pollution from the present power plants
4 0
3 years ago
Read 2 more answers
Other questions:
  • The most popular input device of a computer is a(n) ____.
    6·1 answer
  • Julie bought a house for $315,000 and has a $285,000 mortgage. she claims she has $315,000 in equity. is she correct? if not, ho
    12·2 answers
  • Wireless networks are the most difficult type of network to set up <br> true or false
    15·1 answer
  • Your boss wants to utilize some sort of cloud storage for his files so that all of his
    10·2 answers
  • If you have a long title for a table and need it to span several cells, you can use A. Merge Cells. B. Split Cells. C. Insert Co
    5·1 answer
  • In "When Is a Planet Not a Planet?" why does the author say that the outer planets are made of gas when the inner planets are ma
    5·1 answer
  • Which of the following substances increases in quantity during repititive muscle contraction during oxygen deficti ?
    11·1 answer
  • Which person would be the best fit for a career in the Information Technology field?
    6·2 answers
  • 1. Identify one modern technology and discuss its development and discuss what future changes might occur that could have an eve
    13·1 answer
  • 4. Contoso, Ltd. has a vigorous Office 365 and Azure cloud-service presence.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!