package problema3;
import java.io.*;
/**
*
* @author ABEL MONTALVAN
*/
public class Problema3 {
/**
* @param args the command line arguments
*/
public static void main(String[] args)throws IOException {
//varible
int n1,n2,c,r;
BufferedReader in =new BufferedReader(new InputStreamReader(System.in));
System.out.println("numero 1:");
n1 = Integer.parseInt(in.readLine());
System.out.println("numero 2:");
n2 = Integer.parseInt(in.readLine());
//proceso
c=n1/n2;
r=n1%n2;
//salida
System.out.println("");
System.out.println("cociente: " +c);
System.out.println("residuo: " +r);
// TODO code application logic here
}
}
No hay comentarios:
Publicar un comentario