Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class AddNumbers {
- public static void main(String[] args) {
- int x, y, z;
- System.out.println("Enter two integers to calculate their sum");
- Scanner in = new Scanner(System.in);
- x = in.nextInt();
- y = in.nextInt();
- z = x + y;
- System.out.println("The sum of your integers =" +z);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement