Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
604 B
1
Indexable
Never
import java.util.Scanner;
class grade{
public static void main(String[] args){
	
float cgpa;
Scanner inp=new Scanner(System.in);	
System.out.println("Enter your cgpa");
cgpa=inp.nextFloat();
if (cgpa>9){
	System.out.println("\n S grade"	);
}
else if (cgpa<=9&&cgpa>7.5){
	System.out.println("\n A grade");
}

else if (cgpa<=7.5&& cgpa>6){
	System.out.println("\n B grade");
}
else if (cgpa<=6&&cgpa>5){
	System.out.println("\n C grade");
}	
	else if (cgpa<=5&&cgpa>4){
	System.out.println("\n D grade");
}	
	
else {
	System.out.println("\n F grade");
}		

	
inp.close();	
	
	
	
	
	
	
	
	
	
	
	
}
	
	
	
}