View Code of Problem 1

public class ProblemAb{
  public static void main(String []args){
  int a = ;
    int b = 0;
    Scanner scan1 = new Sacnner(System.in);
    if(scan1.hasNextInt()){
    a = scan1.nextInt();
    }
    Scanner scan2 = new Scanner(System.in);
    if(scan2.hasNextInt()){
    b = scan2.nextInt();
    }
    System.out.println(a+b);
  }
}
/*
Main.java:3: error: illegal start of expression
  int a = ;
          ^
1 error
*/

Double click to view unformatted code.


Back to problem 1