请教一下最后一段哪里错了
来源:6-3 编程练习
慕丝1146895
2019-08-16 00:18:50
import java.util.Scanner;
public class ScoreDemo{
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
//输出提示信息
System.out.println("优秀!");
//从键盘输入一个整型数据作为分数,并放到变量score中
int score=sc.nextInt();
//对成绩进行判断,输出对应的内容
if (score>=85){
System.out.println("优秀!很棒!");
} else if(score<85 && score>=75){
System.out.println("良!可以再优秀一点!");
} else if(score<75 && score>=60){
System.out.println("及格!还可以!");
} else {
System.out.println("不及格!情况不太妙!");
}这是错误原因:
/data/webroot/1153/27741/ScoreDemo.java:20: error: reached end of file while parsing } ^ 1 error
4回答
bao_
2019-08-18
错误报的java:20行 看看大括号是否对应 }
慕丝1146895
提问者
2019-08-16
我知道了,后面漏了俩大括号
DaphneOdera
2019-08-19
少了大括号
辰星万里
2019-08-18
最后面少了一个大括号 }
相似问题