Write a program to accept the marks of a student. If the marks obtained are greater than or equal to 80, print ‘Grade A’ and if it is less than 80 but greater than or equal to 50, print ‘Grade B’ otherwise print ‘Grade C’ on blue j
Answers
Answered by
1
import java.util.*;
public class project1
{
public static void main(String args[])
{
Scanner scr = new Scanner(System.in);
System.out.println("Enter you marks");
double a = scr.nextDouble();
if(a>=80)
System.out.println("Grade A");
else if(a<80 && a>=50)
System.out.println("Grade B");
else
System.out.println("Grade C");
}
}
Similar questions