Question: Write a program which reads three integers (say, a, b and c), then prints these three numbers System.out.println(a + + b +

Write a program which reads three integers (say, a, b and c), 

Write a program which reads three integers (say, a, b and c), then prints these three numbers System.out.println(a + " " + b + " " + c); and then rearranges the values in these variables in such a way that a contains the smallest of the three numbers, b-the middle one, and c-the largest. Print again System.out.println(a + " " + b + " " + c); and you shoud see the same three numbers, but in ascending order. Any two (or all three) numbers may be equal. Do not use arrays or Strings!

Step by Step Solution

3.35 Rating (155 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Sure heres a possible solution import javautilScanner public cl... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!