Advertisement
Sher123

Untitled

Sep 22nd, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. package MisterV;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class addition {
  6.  
  7.  
  8.  
  9. public static void main(String[] args) {
  10. // TODO Auto-generated method stub
  11. System.out.println("Please enter the first number");
  12. Scanner scan = new Scanner(System.in);
  13. int x = scan.nextInt();
  14. System.out.println("Please enter the second number" );
  15. Scanner scan1 = new Scanner(System.in);
  16. int y = scan1.nextInt();
  17. int z = x+y;
  18. System.out.println("The total is " + z);
  19.  
  20. }
  21.  
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement