// This program prints the numbers that a user enters through another number entered by user along // with these values multiplied by 2 and by 3. // Input: two integer not necessary in order // Output: Prints the smaller entered number through the larger along with their values multiplied by 2 and by 3. < import javax.swing public class FinalExamFall2012 { public static void main(String args[]) { String head1 = "Number: "; String head2 = "Multiplied by 2: "; String head3 = "Multiplied by 3: "; int numberCounter = 0; int doubled; // Stores the number multiplied by 2. int tripled; // Stores the number multiplied by 3. string SmallerNumString; String LargerNumString; double SmallerNum; double LargerNum; int Number; final int NUM_LOOPS = 2; //decalr variables to accept input //convert input into integers //int SmallerNum, LargerNum; //assign the small number entered to SmallerNum using if condition if (numberCounter > LargerNum) { SmallerNum = LargerNum; } LargerNum = numberCounter; { else (numberCounter > SmallerNum) { SmallerNum = numberCounter; } //assign larger num to appropriate variable Number = JOptionPane.showInputDialog("Enter Number: "); SmallerNum = Double.parseDouble(SmallerNumString); LargerNum = Double.parseDouble(largeerNumString); System.out.println(SmallerNum + " through ” + LargerNum + “ multiplied by 10 and by 100" + "\n"); numberCounter = SmallerNum; // use a do while loop do { doubled = numberCounter * 2; tripled = numberCounter * 3; // Multiply by 2. // Multiply by 3. System.out.println(head1 + numberCounter); System.out.println(head2 + doubled); System.out.println(head3 + tripled); numberCounter++; System.out.print("\n"); } while(numberCounter <= NUM_LOOPS ); //cosntruct while loop condition // End of do while loop. // This is the work done in the endOfJob() method System.exit(0); } // End of main() method. } // End class. >