Advertisement
Guest User

Scanner

a guest
Feb 21st, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1.  
  2. import java.util.Scanner;
  3. import java.lang.*;
  4. import java.io.*;
  5.  
  6. class Ideone
  7. {
  8. public static void main (String[] args) throws java.lang.Exception
  9. {
  10.  
  11. int a,b;
  12. Scanner liczbaA = new Scanner(System.in);
  13. a= liczbaA.nextInt();
  14. Scanner liczbaB = new Scanner(System.in);
  15. b= liczbaB.nextInt();
  16. int suma;
  17. suma = a+b;
  18. System.out.println("suma tych liczb wynosi "+suma);
  19. }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement