Answer to Question #326582 in Java | JSP | JSF for Hi88qqw

Question #326582

Write a program to determine if the given grade is within the range of 1.00 to 5.00


1
Expert's answer
2022-04-10T05:24:33-0400


import java.util.Scanner;


public class App {


	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		System.out.print("Enter the grade: ");
		double grade = in.nextDouble();
		if (grade >= 1.00 && grade <= 5.00) {
			System.out.println("The given grade is within the range of 1.00 to 5.00");
		} else {
			System.out.println("The given grade is out the range of 1.00 to 5.00");
		}
		in.close();
	}


}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS