1. input.nextInt();
2. grade="等级为A";
3. if(score>=80) grade="等级为B";
4. if(score>=70) grade="等级为C";
5. if(score>=60) grade="等级为D";
6. grade="等级为E";
不要写score>=80 && score<90这种判断,只会增加额外负担,不然虽然对,但是老师可能会批评你的哦~
1. input.nextInt();
2. grade="等级为A";
3. if(score>=80 && score<90) grade="等级为B";
4. if(score>=70 && score<80) grade="等级为C";
5. if(score>=60 && score<70) grade="等级为D";
6. grade="等级为E";
您好,我是有问必答小助手,您的问题已经有小伙伴解答了,您看下是否解决,可以追评进行沟通哦~
如果有您比较满意的答案 / 帮您提供解决思路的答案,可以点击【采纳】按钮,给回答的小伙伴一些鼓励哦~~
ps:问答VIP仅需29元,即可享受5次/月 有问必答服务,了解详情>>>https://vip.csdn.net/askvip?utm_source=1146287632