FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
Java-Tutorials/6.Java_exercise_1/Percentage_calc.java at main · kishanrajput23/Java-Tutorials · GitHub
kishanrajput23
/
Java-Tutorials
Public
Notifications
You must be signed in to change notification settings
Fork
22
Star
56
Code
Issues
0
Pull requests
1
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
Java-Tutorials
/
6.Java_exercise_1
/
Percentage_calc.java
Copy path
More file actions
More file actions
Latest commit
History
History
History
30 lines (22 loc) · 934 Bytes
Breadcrumbs
Java-Tutorials
/
6.Java_exercise_1
/
Percentage_calc.java
Copy path
File metadata and controls
30 lines (22 loc) · 934 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import
java
.
util
.
Scanner
;
public
class
MyClass
{
public
static
void
main
(
String
args
[]) {
Scanner
sc
=
new
Scanner
(
System
.
in
);
int
a
,
b
,
c
,
d
,
e
;
float
result
,
percentage
;
System
.
out
.
println
(
"Enter your marks respectively"
);
System
.
out
.
println
(
"Enter your marks in Hindi Subject"
);
a
=
sc
.
nextInt
();
System
.
out
.
println
(
"Enter your marks in English Subject"
);
b
=
sc
.
nextInt
();
System
.
out
.
println
(
"Enter your marks in Math Subject"
);
c
=
sc
.
nextInt
();
System
.
out
.
println
(
"Enter your marks in Physics Subject"
);
d
=
sc
.
nextInt
();
System
.
out
.
println
(
"Enter your marks in Chemistry Subject"
);
e
=
sc
.
nextInt
();
result
=
a
+
b
+
c
+
d
+
e
;
percentage
= (
result
/
500
) *
100
;
System
.
out
.
println
(
"Your percentage is "
+
percentage
);
}
}
Back
|
FazBrowse Home
|
New Git URL