Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Micro Micro Gc prog (436) class GWrite Lear G %20T222%20-%20Assessment%20Brief%202%20(6).pdf 2/2 - - 59% +| 4. Debugging (10 Marks) See the program below, which
Micro Micro Gc prog (436) class GWrite Lear G %20T222%20-%20Assessment%20Brief%202%20(6).pdf 2/2 - - 59% +| 4. Debugging (10 Marks) See the program below, which has syntax and/or logic errors. In each case, determine the problem and fix the errors. 1 Program: Public class Average { public static void main(String() Args) { Scanner input = new scanner(System.in); System.out.println("Enter a list of nonnegative scores.); System.out.println("Mark the end with a negative number.") System.out.println("I will compute their average."); double next, sum; int count = 0; next=input.nextDouble(); while(next >= 0) { } sum = sum + next; count+; next = keyboard.nextDouble(); if (count == 0) System.out.println("No scores entered."); else { double average = sum/count; system.out.println(count + " scores read."); System.out.println("The average is " + average); } } } tv N MacBook Air D l A W
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started