This preview shows page 1. Sign up to view the full content.
Unformatted text preview: intTwo = stdIn.nextInt(); System.out.println("Please enter your third digit."); intThree = stdIn.nextInt(); System.out.println("The average is:"); double average; average = (intOne + intTwo + intThree); System.out.println(average / 3); } } /* initialize sum to 0 initialize cout to 0 while there is more input read number add number to sum add one to count avg is sum / count display avg...
View Full Document
This note was uploaded on 04/03/2010 for the course COMPSCI 600.107 taught by Professor Houlahan during the Spring '08 term at Johns Hopkins.
- Spring '08