3-4 Exam Grade
Post date: Feb 8, 2014 6:16:31 PM
// this program to exam grade
package exam.grade;
import java.util.Scanner;
public class ExamGrade {
public static void main(String[] args) {
// TODO code application logic here
int mark;
System.out.println("Hello Guest! \n Welcome to Exam Grade Program! \n \n Please enter your score:");
Scanner k=new Scanner(System.in);
mark=k.nextInt();
System.out.print("Your grade for your score is ");
switch((int)(mark/10))
{
case 10: ;
case 9: ;
{
System.out.println("Excellent");
}
break;
case 8:System.out.println(" V.Good");break;
case 7:System.out.println("Good"); break;
case 6:System.out.println(" Fair");break;
case 5:System.out.println("Pass");break;
case 4: ;
case 3: ;
case 2: ;
case 1: ;
case 0:System.out.println(" Fail"); break;
default:System.out.println("error has occurred");
}
}
}