Computer Science, asked by royananya843, 5 days ago

Write a program to find the grade based on the following:

Marks>=90 “A1”

Marks>=80 “A2”

Marks>=70 “B1”

Marks>=60 “B2”

Marks<60 “C”​

Answers

Answered by kaashviGoel
0

Explanation:

import java.util.*;

class Program

{

public static void main (String args[])

{

Scanner sc=new Scanner (System.in);

System.out.print("Grade:");

int marks=sc.nextInt();

if (marks>=90)

System.out.println("Grade: A1");

else if (marks>=80)

System.out.println("Grade: A2");

else if (marks>=70)

System.out.println("Grade: B1");

else if (marks>=60)

System.out.println("Grade: B2");

else

System.out.println("Grade: C");

}

}

Similar questions