write a program in Java to enter any two integers using scanner class and print the sum
Answers
Answered by
2
Answer:
import java.util.*;
class Sum
{
public static void main ()
{
Scanner sc= new scanner (System.in);
int a=sc.nextInt();
int b=sc.nextInt();
int s= a+b;
System.out.println("Sum =" +s);
}
}
Similar questions