//Class depending on marks
import java.util.Scanner;
class Class {
public static void main(String args[])
{
Scanner sc=new Scanner(System.in);
System.out.println("Enter marks of a student:");
int m=sc.nextInt();
if(m>=70)
System.out.println("Distinction");
else if(m>=60)
System.out.println("First Class");
else if(m>=50)
System.out.println("Second Class");
else if(m>=40)
System.out.println("Third Class");
else
System.out.println("Fail");
}
}
import java.util.Scanner;
class Class {
public static void main(String args[])
{
Scanner sc=new Scanner(System.in);
System.out.println("Enter marks of a student:");
int m=sc.nextInt();
if(m>=70)
System.out.println("Distinction");
else if(m>=60)
System.out.println("First Class");
else if(m>=50)
System.out.println("Second Class");
else if(m>=40)
System.out.println("Third Class");
else
System.out.println("Fail");
}
}
No comments:
Post a Comment