Advertisement
Guest User

Untitled

a guest
Feb 14th, 2016
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class prog1 {
  4. public static void main(String[] args)
  5. {
  6. Scanner sc = new Scanner(System.in);
  7. System.out.println("Enter First Number:");
  8. int i = sc.nextInt();
  9. System.out.println("Enter Second Number:");
  10. int j = sc.nextInt();
  11. int z = i + j;
  12. System.out.println("First Number: " + i);
  13. System.out.println("Second Number: " + j);
  14. System.out.println("Sum of Numbers: " + z);
  15. sc.close();
  16. }
  17.  
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement