Home > Back-end >  java
java

Time:09-30

If the else nested thank you

CodePudding user response:


Start a figure.
Suggest you try first by yourself, don't understand the point q, it is targeted.
If you want to laze away don't want to learn, copied from students is also possible.

CodePudding user response:

 System. Out. Println (" please enter the scores "); 
Scanner scanner=new Scanner(System.in);
Int score=scanner. NextInt ();
String grade=null;
If (score>=90 & amp; & Score<{
=100)Grade="A";
} else if (score>=80 & amp; & Score<90) {
Grade="B";
} else if (score>=70 & amp; & Score<80) {
Grade="C".
} else if (score>=60 & amp; & Score<70) {
Grade="D";
} else if (score>=0 & amp; & Score<60) {
Grade="E";
}
System. The out. Println (grade);