Guest User

Untitled

a guest
Nov 23rd, 2017
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. import java.util.*;
  2. class Example{
  3. public static void main(String args[]){
  4. Scanner input=new Scanner(System.in);
  5. int x,y,z;
  6. System.out.print("Input number 1 : ");
  7. x=input.nextInt();
  8. System.out.print("Input number 2 : ");
  9. y=input.nextInt();
  10. z=x+y;
  11. System.out.println(x+" + "+y+" = "+z); //10 + 20 = 30
  12.  
  13. }
  14. }
Add Comment
Please, Sign In to add comment