Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribedimage text in transcribedimage text in transcribedHello, 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 && grade

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

=+ Have they changed the way employers view IP?

Answered: 1 week ago