View Code of Problem 1

import java.util.Scanner;

public class sum{
   public static void main(String[] args){
	   Scanner sc = new Scanner(System.in);
	   int A=sc.nextInt();
	   int B=sc.nextInt();
	   int c=A+B;
	   System.out.println(c);
	   
   }
}

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

Double click to view unformatted code.


Back to problem 1