View Code of Problem 1

import java.util.*;
public class test {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            int a = sc.nextInt();
            int b = sc.nextInt();
            System.out.println(a+b);
        }
    }
}
/*
Main.java:2: error: class test is public, should be declared in a file named test.java
public class test {
       ^
1 error
*/

Double click to view unformatted code.


Back to problem 1