Computer Science, asked by Moo1, 1 year ago

Java program for grades of a single student in a simple if else method without using array


Sanjivanie: with or without scanner
Sanjivanie: ??
Moo1: without

Answers

Answered by Sanjivanie
0
Hi user!

class qwerty
{
public static void main()
{
double sub1=89,sub2=90,sub3=87;
double percent=((sub1+sub2+sub3)/3)*100;
System.out.println(" Your percentage is "+percent);
if(percent>85)
System.out.println("Grade: A");
else
{
if(percent>75)
System.out.println("Grade : B");
else
{
if(percent>65)
System.out.println(" Grade : C");
else
{
if(percent>40)
System.out.println(" Grade : D");
else
System.out.println(" Grade : E");
}
}
}
}
}

Sanjivanie: If this helped you, please mark as brainliest
Similar questions