Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Hello, I am writing a program to calculate the grade, My code does not give me any errors, but the program won't run as it
Hello, I am writing a program to calculate the grade, My code does not give me any errors, but the program won't run as it should. The program asks for the user to input a number, but when I hit enter, it simply goes to the next line, and the user can input infinitely. Can you help find the errors and help me fix the errors, thanks
6 import java.util.Scanner; 7 8 public class P1 { 9 10 @ public static String scoreToLetterGrade (double grade) { 11 12 13 14 15 16 17 18 19 20 -D 21 22 23 24 25 0-D 0D 26 27 28 if (grade >= 90){ return "A+"; } else if (grade >= 85 && grade = 80 && grade = 77 && grade = 73 && grade = 70 && grade = 65 && grade = 60 && grade = 55 && grade = 50 && gradeStep 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