FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
JavaProgramming/MenuDriven.java at main · obliviraorg/JavaProgramming · GitHub
obliviraorg
/
JavaProgramming
Public
forked from
Sbiswas001/JavaProgramming
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
JavaProgramming
/
MenuDriven.java
Copy path
More file actions
More file actions
Latest commit
History
History
History
34 lines (28 loc) · 1.08 KB
Breadcrumbs
JavaProgramming
/
MenuDriven.java
Copy path
File metadata and controls
34 lines (28 loc) · 1.08 KB
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
31
32
33
34
/*Make a menu driven program. The user can enter 2 numbers, either 1 or 0.
If the user enters 1 then keep taking input from the user for a student’s marks(out of 100).
If they enter 0 then stop.
If he/ she scores :
Marks >=90 -> print “This is Good”
89 >= Marks >= 60 -> print “This is also Good”
59 >= Marks >= 0 -> print “This is Good as well” */
import
java
.
util
.*;
public
class
MenuDriven
{
public
static
void
main
(
String
args
[]) {
Scanner
sc
=
new
Scanner
(
System
.
in
);
int
input
;
do
{
int
marks
=
sc
.
nextInt
();
if
(
marks
>=
90
&&
marks
<=
100
) {
System
.
out
.
println
(
"This is Good"
);
}
else
if
(
marks
>=
60
&&
marks
<=
89
) {
System
.
out
.
println
(
"This is also Good"
);
}
else
if
(
marks
>=
0
&&
marks
<=
59
) {
System
.
out
.
println
(
"This is Good as well"
);
}
else
{
System
.
out
.
println
(
"Invalid"
);
}
System
.
out
.
println
(
"Want to continue ? (yes(1) or no(0))"
);
input
=
sc
.
nextInt
();
}
while
(
input
==
1
);
}
}
Back
|
FazBrowse Home
|
New Git URL