TestAverage

TestAverage - testThree=kb.nextDouble(); double...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
import java.util.Scanner; public class TestAverage { public static void main(String[] args) { double testOne; double testTwo; double testThree; Scanner kb= new Scanner(System.in); System.out.println("Enter test score # 1"); testOne=kb.nextDouble(); System.out.println("Enter test score # 2"); testTwo=kb.nextDouble(); System.out.println("Enter test score # 3");
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: testThree=kb.nextDouble(); double averageScore; averageScore = (testOne+testTwo+testThree)/3; System.out.println("Test score # 1 is testOne"); System.out.println("Test score # 2 is testTwo"); System.out.println("Test score # 3 is testThree"); System.out.println("The average of the test scores is averageScore"); } }...
View Full Document

This homework help was uploaded on 04/20/2008 for the course CSCI 1301 taught by Professor Liu during the Spring '08 term at GCSU.

Ask a homework question - tutors are online