View Code of Problem 1

import java.util.Scanner;

public class number {

	/**
	 * @param args
	 */
	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();
		int sum = A + B;
		System.out.println(sum);

	}

}
/*
Main.java:3: error: class number is public, should be declared in a file named number.java
public class number {
       ^
1 error
*/

Double click to view unformatted code.


Back to problem 1