Back to: Java Program’s
0
import java.util.Scanner;
public class student_grading
{
public static void main(String args[])
{
Scanner sc= new Scanner(System.in);
System.out.println("Enter your name");
String name=sc.next();
System.out.println("Enter your roll number");
int roll=sc.nextInt();
System.out.println("Enter marks in English");
int eng=sc.nextInt();
System.out.println("Enter marks in Hindi");
int hindi=sc.nextInt();
System.out.println("Enter marks in Computer Application");
int comp=sc.nextInt();
int total=eng+hindi+comp;
int average=total/3;
System.out.println("\f");
System.out.println("Your name is :"+name);
System.out.println("Your roll number is :"+roll);
System.out.println("Your average marks is :"+average);
if(average>85&&average<=100) { System.out.println("Overall remark :Excellent"); } else if(average>75&&average<=84) { System.out.println("Overall remark :Distinction"); } else if(average>60&&average<=74) { System.out.println("Overall remark :First class"); } else if(average>40&&average<=50)
{
System.out.println("Overall remark :Pass");
}
else if(average<=40)
{
System.out.println("Overall remark :Poor");
}
}
}
Submitted By: Ms. Zarin Shroff
If this program was helpful to you, do leave a comment.
All Creadit goes to Ms. Zarin Shroff
P.N. : All the post on this website are for demonstration and education purpose only.
Student should perform all the practicals for there personal copies.