Crisna el último ejercicio que te hago
![Lengua :P](https://aprenderaprogramar.com/foros/Smileys/default/tongue.gif)
, no por nada, si no, no aprendes, lo siento amigo. lo hago por tu bien, cuando tengas una duda posteala, que te AYUDO, pero no te lo hago.
![Gui�ar ;)](https://aprenderaprogramar.com/foros/Smileys/default/wink.gif)
Funciona de forma GENERAL, con cualquier numero, que este dentro del alcance de un entero, si quieres un numero mas grande que un tipo int, lo convierte a LONG, que son 8 bits
public class TrabajarArray {
public static void main(String args[]){
int[] A = {53,5,31,22,44};
boolean[] M = new boolean[5];
int cont = 0;
int indice = 0;
int resultado = 0;
int time = 0;
for(int i = 1; i <= 100;i++){
if(time== 5){
break;
}
resultado = A[indice] % i;
if(resultado == 0){
cont++;
}
if(cont == 2 && i == 100){
System.out.println(A[indice]+ " es PRIMO");
M[indice] = true;
}
if(cont > 2 && i == 100){
System.out.println(A[indice]+ " NO es PRIMO");
M[indice] = false;
}
if(i == 100){
i = 0;
indice++;
time++;
cont = 0;
}
}
for(int i = 0;i<5;i++){
System.out.println(" A "+A[i]+" es "+M[i]);
}
}
}