Question: Write a program to input three test scores and calculate the average. I wrote this code, and it won't print the whole results. anyone has
Write a program to input three test scores and calculate the average.

I wrote this code, and it won't print the whole results. anyone has an idea of what I might done wrong?
X N 0 000 Progre S ma 7 8 9 Program 1.java X 1 import java.util.Scanner; 2 3 4 public class Programi { 5 60 public static void main(String[] args) { double score1, score2, score3, average, total; Scanner sc = new Scanner(System.in); System.out.println("Enter test score 1: 80"); 10 scorel = sc.nextDouble(); 11 12 System.out.println("Enter test score 2: 91"); 13 score2 = sc.nextDouble(); 14 15 System.out.println("Enter test score 3: 75"); 16 score3 = sc.nextDouble(); 17 18 total = scorel + score2 + score3; 19 20 average = total/3; 21 22 System.out.println("The average of the three test scores is "+average); 23 } 24 25 } 26 7 Problems @ Javadoc Declaration Search Console X Program 1 [Java Application] /Library/Java/JavaVirtual Machines/jdk-14.0.1.jdk/Contents/Home/bin/java (Feb 10, 2021, 8:19:13 PM) Enter test score 1: 80
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
