Plz tell the answers quickly
I will mark the correct ans
Brainest plz plz
Share
Plz tell the answers quickly
I will mark the correct ans
Brainest plz plz
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Verified answer
Required Answer:-
Question:
Solution:
Here comes the códe.
import java.util.*;
public class Grade {
public static void main(String[] args) {
double marks;
String g;
Scanner sc=new Scanner(System.in);
System.out.print("Enter marks percentage: ");
marks=sc.nextDouble();
if(marks>=90)
g="O";
else if(marks>=80)
g="A";
else if(marks>=70)
g="B";
else
g="C";
System.out.println("Grade: "+g);
sc.close();
}
}
Algorithm:
Refer to the attachment for output ☑.