View Code of Problem 1

import java.util.Scanner;
public class main{
  public static void main(String [ ] args){
    int c = 0;
    Scanner scan = new Scanner(System.in);
    int a = scan.nextInt();
    int b = scan.nextInt();
    c = a + b;
    System.out.println(c);
  }
}
/*
Main.java:2: 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