Advertisement
Guest User

Untitled

a guest
May 17th, 2018
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Welcome1 {
  4.  
  5.  
  6. public static void main(String[] args) {
  7.  
  8. Scanner input=new Scanner(System.in);
  9. int a;
  10. int b;
  11. int sum;
  12. System.out.println("enter first number");
  13. a=input.nextInt();
  14. System.out.println("enter second number");
  15. b=input.nextInt();
  16. sum=a+b;
  17. System.out.printf("total %d\n",sum);
  18. }
  19.  
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement