Question: import java.util.Scanner; public class AverageGrade { public static void main(String[] args) { double TestScore1; double TestScore2; doubleTestScore3; String name1; Scanner Keyboard = new Scanner(System.in); System.out.print(Please
import java.util.Scanner;
public class AverageGrade {
public static void main(String[] args) {
double TestScore1;
double TestScore2;
doubleTestScore3;
String name1;
Scanner Keyboard = new Scanner(System.in);
System.out.print("Please enter your name:");
name1 = Keyboard.nextLine();
System.out.println("Please enter test score 1");
TestScore1 = Keyboard.nextInt();
System.out.println("Please enter test score 2");
TestScore2 = Keyboard.nextInt();
System.out.println("Please enter test score 3");
TestScore3 = Keyboard.nextInt();
double average = ((TestScore1 + TestScore2 + TestScore3)/3);
out.println(name1); // This line is returning error along with the next one. Is what I need help with.
out.println("The average score of the three tests is: " + average);
The last two lines are returning errors that say "out cannot be resolved". The rest of the code are a bunch of if else statements that are not showing any errors. If needed I can provide the rest of the code but I do not think that is relevant to these issues.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
