Ejercicio 2 del curso:
Sumará el mismo numero, si el numero es 5 el resultado será 10.
*/
package ejercicio.pkg2;
import java.io.*;
/**
*
* @author CLAUDIA INGA
*/
public class Ejercicio2 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) throws IOException{
// TODO code application logic here
int a,c;
BufferedReader in =new BufferedReader(new InputStreamReader(System.in));
System.out.println("ingresar un numero");
a=Integer.parseInt(in.readLine());
c=(a+a);
System.out.println("la suma con el mismo numero es "+c);
}
}
No hay comentarios:
Publicar un comentario