Program:
import java.util.Scanner; class LetterGrade { public static void main (String args[]) { int grade; Scanner read=new Scanner(System.in); System.out.print("Enter your grade: "); grade=read.nextInt(); if(grade>=90) System.out.print("Letter Grade: A"); else if(grade>=80) System.out.print("Letter Grade: B"); else if(grade>=70) System.out.print("Letter Grade: C"); else if(grade>=60) System.out.print("Letter Grade: D"); else System.out.print("Letter Grade: F"); } }
Post A Comment:
0 comments: