Guest User

Untitled

a guest
Jul 18th, 2018
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. import java.io.*;
  2. public class suma {
  3.  
  4.  
  5.  
  6. public static void main (String [] args)
  7. {
  8. InputStreamReader isr = new InputStreamReader(System.in);
  9. BufferedReader br = new BufferedReader (isr);
  10.  
  11. try
  12. {
  13. System.out.print("Sumando 1 : ");
  14. int s1 = Integer.parseInt(br.readLine());
  15. System.out.print("Sumando 2 : ");
  16. int s2 = Integer.parseInt(br.readLine());
  17. int suma=s1+s2;
  18. System.out.println ("La suma es " + s1 + "+" + s2 +"="+ suma);
  19. }
  20. catch (Exception e)
  21. {
  22. e.printStackTrace();
  23. }
  24. }
  25.  
  26.  
  27. }
Add Comment
Please, Sign In to add comment