1. prompt the users to input two integers: firstNum and secondNum (firstNum must be less than secondNum).

2. output all the odd numbers between firstNum and secondNum inclusive

3. output the sum of all the even numbers between firstNum and secondNum inclusive

4. output all the numbers and their squares between 1 and 10

5. output the sum of the squares of all the odd numbers between firstNum and secondNum inclusive

6. output all the uppercase letter.

and lastly there is a hint: if currentNum % 2 = 0, then the currentNum is an even number. Otherwise it is an odd number.

import.java.util*; public class WhileLoops{ public static void main(String[] args){ // declare varibles int = firstNum = 0, secondNum = 0; String even,odd,sum Scanner scan = new Scanner(System.in) //prompt user for integera and store them System.out.println("Enter two numbers"); firstNum = scan.nextInt(); secondNum = scan.nextInt(); //output results while(firstNum <= secondNum){ if (currentNum%2 == 0) System.out.println( " " + even); else System.out.println( " " + odd); }

this is all I have and I am clueless on the rest of the codes. Can someone please help me?

This post has been edited by **cathyd0890**: 21 November 2010 - 07:42 PM