// // // Q2 // Name: ThreeReals.java // .. // Goal: Read three real #s, out in decreasing order // // import java.util.Scanner; public class ThreeReals { public static void main(String[] args) { Scanner kb = new Scanner(System.in); double x, y, z; System.out.print("Input 3 reals: "); x = kb.nextDouble(); y = kb.nextDouble(); z = kb.nextDouble(); if(x>y && y>z) System.out.println("Re-order: " + x + ", " + y + ", " + z); else if (y>x && x>z) System.out.println("Re-order: " + y + ", " + x + ", " + z); else System.out.println("Other orders"); } }