1 / 1100%
// AUTHOR: Junqing Peng
import java.util.Scanner;
public class Lab1{
public static void main(String[] args) {
int NUM_TESTS = 3;
System.out.print("Enter the score on the first test: ");
Scanner input = new Scanner(System.in);
int test1 = input.nextInt();
int test2 = input.nextInt();
int test3 = input.nextInt();
int finalTestScore = test1 + test2 + test3;
double average = finalTestScore / (double) NUM_TESTS;
System.out.println("Your average test score is: " + average);
}
}
Powered by TCPDF (www.tcpdf.org)
// FILENAME: lab1.java
// SPECIFICATION: lab 1
// FOR: CSE 110- Lab #1
// TIME SPENT: 30min
//-------------------------------------------------------------
Students also viewed