/*    The program will ask the user to enter two numbers, then it will find the sum of the two numbers
        It will output the two numbers entered by the user, and the sum of the two numbers.
*
*/
import java.util.Scanner;    //needed for the scanner class
public class SumNumber
{
        public static void main(String[] args)
        {
                int x, y;    //Now x and y can hold integers
                int sum = 0;    // Set sum as 0
                Scanner key = new Scanner(System.in);    // Creating the Scanner object
                System.out.println("Enter the first integer: ");
                x = key.nextInt();                                            //Store the first integer into x
                System.out.println("Enter the second integer: ");
                y = key.nextInt();                                            //Store the second integer into y

                sum = x + y;                //adds up the first and second integers then store it into sum
                System.out.println("The integers you entered are " + x + " and " + y);    //Outputs the integers entered by the user
                System.out.println("The sum of the integer is " + sum);                        //Outputs the sum of the two integers
        }
}
