You are on page 1of 1

Class Question_1 - Susamoy Mukherjee, roll no.

- 60 terminal project
1/1

1 /* NAME- SUSAMOY MUKHERJEE, CLASS- 9, SECTION- C,


2 ROLL NUMBER- 59 */
3 import java.util.*;
4 class Question_1
5 {
6 public static void main(String args[])
7 {
8 int m1, m2, m3, cl;
9 String nm;
10 Scanner sc= new Scanner(System.in);//Scanner object is created
11 System.out.println("Enter name");
12 nm= sc.nextLine();//name
13 System.out.println("Enter class");
14 cl= sc.nextInt();//class
15 System.out.print("Enter marks in English= ");
16 m1= sc.nextInt();//marks of english
17 System.out.print("Enter marks in Maths= ");
18 m2= sc.nextInt();//marks of maths
19 System.out.print("Enter marks in Science= ");
20 m3= sc.nextInt();//marks of science
21 double avg= m1+m2+m3/3.0;//Average of marks of three subjects
22 System.out.println("The average marks= "+avg);
23 String g= " ";
24 if(avg>=90)
25 g= "A";
26 else if(avg>70 && avg<90)
27 g= "B";
28 else if(avg>50 && avg<70)
29 g= "C";
30 else if(avg<=50)
31 g= "D";
32 System.out.println("The Grade= "+g);
33 }
34 }
35

6 Aug, 2023 12:07:20 AM

You might also like