0_0_33882699_10889\Main.java:1: 错误: 需要class, interface或enum
2 import java.util.Scanner; public class Main { //杭电这一题class名必须是Main,不然不能通过 public static void main(String[] args){ Scanner sc = new Scanner(System.in); while(sc.hasNextInt()) { int a=sc.nextInt(); int b=sc.nextInt(); System.out.println(a+b); } } }
^
0_0_33882699_10889\Main.java:1: 错误: 解析时已到达文件结尾
2 import java.util.Scanner; public class Main { //杭电这一题class名必须是Main,不然不能通过 public static void main(String[] args){ Scanner sc = new Scanner(System.in); while(sc.hasNextInt()) { int a=sc.nextInt(); int b=sc.nextInt(); System.out.println(a+b); } } }
^
2 个错误
|