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
LekaFEV [45]
3 years ago
13

C++ program: Write a program that prompts the user to input three numbers. The program should then output the numbers in ascendi

ng order, separated by a single space.
Computers and Technology
1 answer:
Lelechka [254]3 years ago
3 0

Answer:

// here is code in C++.

#include<iostream>

using namespace std;

int main()

{

// declare variables

  double num1, num2, mun3, t;

  cout << "Enter three numbers: ";

// read the three numbers

  cin >> num1 >> num2 >> mun3;

  //sort the three numbers

  if( num1>num2 )

  {

     t = num1;

     num1 = num2;

     num2 = t;}

  if( num2>mun3 ){

     t = num2;

     num2 = mun3;

     mun3 = t;}

  if( num1>num2 ){

     t = num1;

     num1 = num2;

     num2 = t;

  }

  // print the output

  cout<<"numbers in ascending order:";

  cout << num1 << " " << num2 << " " << mun3 << endl;

  return 0 ;

}

Explanation:

Declare three variables to store the input. Read the value of all three variables. If first number is greater than second, then with the help of variable "t" swap the  value of first and second.after that if second is greater than third number, swap them.In last if first number is greater than second one then swap them. This will sort the three numbers in ascending order.

Output:

Enter three numbers: 3 7 2                                                                                                

numbers in ascending order:2 3 7

You might be interested in
What Network does zoom run on? Does anyone use it (hint Hint)
rewona [7]

Answer:

  • The bandwidth used by Zoom will be optimized for the best experience based on the participant's' network. It will automatically adjust for 3G, WiFi, or wired environments.
  • i use g00gle meet bc zoom does not work on my school macbook...

Explanation:

:)

3 0
3 years ago
The quality of lacking a pattern or organization so that result are unpredictable is also known as?
Aloiza [94]
<h2>Answer:</h2>

The quality of lacking a pattern or organization so that result are unpredictable is also known as<u> Randomness.</u>

<h2>Explanation:</h2>

In the daily routine work, randomness can be defined as the apparent lack of pattern. Randomness occurs when there is no predictability in events. Thus a random pattern of events, steps or symbols often has no sequence and order so they lead eventually towards Randomness. Similarly when elements will not follow an intelligible pattern or a proper combination they will result in Randomness.

<h3>I hope it will help you!</h3>
3 0
3 years ago
Rain,snow,wind,clouds are part of
Verizon [17]

Answer:

The Troposphere

Explanation:

This is the lowest part of the atmosphere - the part we live in. It contains most of our weather - clouds, rain, snow. In this part of the atmosphere the temperature gets colder as the distance above the earth increases

5 0
2 years ago
In which model does the color black form the key color?
Montano1993 [528]

Answer:

RGB function basically used generated any color such as black or key color combination

Explanation:

In computer, all color code is generated based on RGB functions.

RGB function is color function code red, green and blue combination. It is eight bit color code is used.

If end-user  he or she uses RGB(255,0,0) where red color code is generated

If end-user he or she uses RGB(0,255,0) where green color code is generated  

If end-user he or she uses RGB(0,0,255) where green color code is generated

Based on these combination end user can generate code and displayed in the screen

End use can use RGB(255,255,255) for white and RGB(0,0,0) for black.

7 0
3 years ago
Clouds were developed to ensure non-scalability. True False
Reika [66]

Answer:

True I think

not completely sure

8 0
3 years ago
Other questions:
  • Chris has just graduated from high school. He hopes to complete a carpenter's apprenticeship and eventually open his own busines
    9·2 answers
  • In the design phase of the systems development life cycle (SDLC), the _____ design is an overview of the system and does not inc
    10·1 answer
  • Nonprogrammed decision
    7·1 answer
  • Write the steps of applying background colour to the document?​
    15·2 answers
  • What does good time management mean​
    8·2 answers
  • 1
    8·1 answer
  • Communication protocols, sets of rules agreed to by all parties, are designed in order to:
    15·1 answer
  • 100POINTS!!!!!!!!!!!!!!!!!!!I WILL ANSWER ALL OF YOUR QUESTIONS PLEASE LOVES:)))Upload your completed project including the foll
    12·1 answer
  • It takes Mike 18 minutes to finish reading 4 pages of a book. How long would it take for him to finish 30 pages ?​
    9·1 answer
  • What is output?<br> x = 2<br> y = 3<br> print (x * y + 2)<br> 4<br> 2<br> 8<br> 10
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!