import java.util.Scanner; public class Main6 { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int get = Integer.parseInt(scanner.nextLine()); for (int i = 0; i < get; i++) { String[] gets = scanner.nextLine().split(" "); int n1 = Integer.parseInt(gets[0]); int n2 = Integer.parseInt(gets[1]); System.out.println(n1 + n2); } } } /* Main.java:3: error: class Main6 is public, should be declared in a file named Main6.java public class Main6 { ^ 1 error */ |
Double click to view unformatted code.