import java.io.*; public class WhileLoops { static BufferedReader keyboard = new BufferedReader (new InputStreamReader (System.in)); public static void main (String[] args) throws IOException { int firstNum, secondNum; int i; int sum = 0; System.out.print ("Please enter the first integer: "); firstNum = Integer.parseInt (keyboard.readLine()); //Ask user for second number, must be larger than first. //Continue to ask the user until they give you a good one. // input validation: make sure firstNum is less than secondNum // print all the odd numbers between firstNum and secondNum System.out.println ("Odd numbers between " + firstNum + " and " + secondNum + ": "); //while loop here // print the sum of the even numbers between firstNum and secondNum System.out.print ("Sum of even numbers between " + firstNum + " and " + secondNum + ": "); //while loop here System.out.println (sum); } }