File tree 1 file changed +30
-0
lines changed
1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change
1
+ import java .util .Scanner ;
2
+
3
+ public class MyClass {
4
+ public static void main (String args []) {
5
+ Scanner sc = new Scanner (System .in );
6
+ int a , b , c , d , e ;
7
+ float result , percentage ;
8
+ System .out .println ("Enter your marks respectively" );
9
+
10
+ System .out .println ("Enter your marks in Hindi Subject" );
11
+ a = sc .nextInt ();
12
+
13
+ System .out .println ("Enter your marks in English Subject" );
14
+ b = sc .nextInt ();
15
+
16
+ System .out .println ("Enter your marks in Math Subject" );
17
+ c = sc .nextInt ();
18
+
19
+ System .out .println ("Enter your marks in Physics Subject" );
20
+ d = sc .nextInt ();
21
+
22
+ System .out .println ("Enter your marks in Chemistry Subject" );
23
+ e = sc .nextInt ();
24
+
25
+ result = a + b + c + d + e ;
26
+ percentage = (result /500 ) * 100 ;
27
+
28
+ System .out .println ("Your percentage is " + percentage );
29
+ }
30
+ }
You can’t perform that action at this time.
0 commit comments