Login
...or Sign up
Home
Search
Search Code Snippets
Search People
suma de dos numeros
import java.io.*; public class suma { public static void main (String [] args) { InputStreamReader isr = new InputStreamReader(System.in); BufferedReader br = new BufferedReader (isr); try { System.out.print("Sumando 1 : "); int s1 = Integer.parseInt(br.readLine()); System.out.print("Sumando 2 : "); int s2 = Integer.parseInt(br.readLine()); int suma=s1+s2; System.out.println ("La suma es " + s1 + "+" + s2 +"="+ suma); } catch (Exception e) { e.printStackTrace(); } } }
Petición de dos numeros por teclado y presentación por pantalla del resultado
Score: 0/10
Would you like to comment?
Sign up
for a free account or
sign in
(if you are already a member).
URL:
Embed:
Uploaded on 7/17/2008 11:33:35 AM
by
josino
Programming Language:
java
Tags:
suma
Viewed 520 times
Help
Help by email
What is Naslu?
|
About Naslu
|
Contact
|
Terms of Use
|
Downloads
|
Webprogramacion.com
|
Blog
|
Top
Links
Select language:
Español
|
English
© 2009 naslu.com