View Code of Problem 1

import java.util.Scanner;

public class main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner in = new Scanner(System.in);
		int a = in.nextInt();
        int b = in.nextInt();
        System.out.println( a + b );
	}
}
/*
Main.java:3: error: class main is public, should be declared in a file named main.java
public class main {
       ^
1 error
*/

Double click to view unformatted code.


Back to problem 1