import java.io.*;
public class multiplicar
{
public static void main (String [] args)
{
InputStreamReader isr = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader (isr);
try
{
System.out.print("numero 1 : ");
int p1 = Integer.parseInt(br.readLine());
System.out.print("numero 2 : ");
int p2 = Integer.parseInt(br.readLine());
int producto=p1*p2;
System.out.println ("El producto es " + p1 + "*" + p2 +"="+ producto);
}
catch (Exception e)
{
e.printStackTrace();
}
}
}
Programa que multiplica dos numeros enteros
No hay comentarios:
Publicar un comentario