View
212
Download
0
Embed Size (px)
DESCRIPTION
fiestjava
Citation preview
public static void main(String[] args) {
Scanner leer = new Scanner(System.in);
int b=0,i,n;
System.out.print("Ingrese un numero: ");
n=leer.nextInt();
for(i=1;i<(n+1);i++){
if(n%i==0){
b++;
}
}
if(b!=2){
System.out.println("No es Primo");
}else{
System.out.println("Si es Primo");
}
}
}
CURSO DE PIÑATERÍA Y
MANUALIDADES
Costo 350,00 Reserva con el 50%