Advertisement
Duey

AddNumbers

Sep 22nd, 2014
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.35 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class AddNumbers {
  4.    
  5.     public static void main(String[] args) {
  6.        
  7.         int x, y, z;
  8.         System.out.println("Enter two integers to calculate their sum");
  9.        
  10.         Scanner in = new Scanner(System.in);
  11.         x = in.nextInt();
  12.         y = in.nextInt();
  13.         z = x + y;
  14.        
  15.         System.out.println("The sum of your integers =" +z);
  16.        
  17.     }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement