Computer Science, asked by mohammedbasim9345, 5 months ago

to input two different number then find the sum what is the program

Answers

Answered by mohammadadnan7
0

Answer:

import java.util.*;

class Sum

{

public static void main(String args [])

{

Scanner sc=new Scanner(System.in)

int a,b,sum=0;

System.out.println("enter two different numbers");

a=sc.nextInt();

b=sc.nextInt();

sum=a+b;

System.out.println("Sum = "+sum);

}

}

Similar questions