Read the instructions, they are quite explicit:
Quote:
A program to take 3 variables (int, float, double)
That's not the same as reading three integers!
You will then need to convert each to the "highest" type:
double
.
So the first thing to do is prompt him for an integer, and read it. Convert it to a double called Value1
Then prompt him for an float, and read it. Convert it to a double called Value2
Compare them. and swap them over if Value1 is greater than Value2.
Now prompt him for an double, and read it into a variable called Value3.
If Value3 is smaller than Value2, swap them.
If Value2 is smaller than Value1, swap them.
You now have your three values in ascending order:
Value1 <= Value2 <= Value3
Print them in that order for the ascending, and in reversed order for descending.
No loops used!