JAVA CODE FOR SUM OF TWO NUMBERS

 import java.util.Scanner;


public class sumnum{
    public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    System.out.print("enter two numbers :");
    int a = sc.nextInt();
    int b = sc.nextInt();

    int c = a+b;
    System.out.print("sum="+c);
    }
}

Comments

Popular Posts