Java Program 8

PROGRAM:


import java.util.Scanner;


public class AddNumbers {
public static void main(String args[])
{
int x,y,z;

System.out.println("Enter 2 integers to calculate sum");
Scanner in = new Scanner(System.in);

x = in.nextInt();
y = in.nextInt();
z=x+y;
System.out.println("Sum of integers =" +z);


}
}


OUTPUT:


Enter 2 integers to calculate sum
45
52
Sum of integers =97


Related topics

Please use contact page in this website if you find anything incorrect or you want to share more information about the topic discussed above.