Question: Trace the program and write the output, assume the user enters 83,77, 92,-1: import java.util.*; public class KnowingGrade { public static void main(String[] args)

 Trace the program and write the output, assume the user enters 83,77,  

Trace the program and write the output, assume the user enters 83,77, 92,-1: import java.util.*; public class KnowingGrade { public static void main(String[] args) { Scanner input= new Scanner(System.in); int grade, count; count = 0; System.out.println("please enter a grade between 1-100, -1 to finish: "); grade = input.nextInt(); while(grade != -1){ if (grade >= 90) System.out.println("You got an A"); else if (grade >= 80) System.out.println("You got a B"); else if (grade >= 70) System.out.println("You got a C"); else if (grade >= 60) System.out.println("You got a D"); else if(grade < 60) System.out.println("You got an F"); System.out.println("please enter a grade between 1-100, -1 to finish: "); grade = input.nextInt(); } if (grade ===== -1) System.out.println("You finished entering grades");}} Acti

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!