Foro
Foro
1
import java.io.*;
5.2 import java.io.*;
import
publicjava.io.*;
class ejercicio public class ejercicio {
public
{ public
classstatic
ejercicio
void main(String[]
{ args) throws public static void main(String[] args) throws
IOException IOException {
public static void main(String[] args) throws
IOException
{ BufferedReader
{ br=new BufferedReader(new BufferedReader br=new BufferedReader(new
InputStreamReader(System.in)); InputStreamReader(System.in));
BufferedReader br=new BufferedReader(new
InputStreamReader(System.in));
int N, c, sdiv; int N,cdiv=0,c;
sdiv=0;
int N,cd=0,re=0; do{
do{ System.out.print("Ingrese
do{ el valor de N:"); System.out.println("Ingrese un valor");
N=Integer.parseInt(br.readLine());
System.out.println("Ingrese un valor"); N=Integer.parseInt(br.readLine());
} N=Integer.parseInt(br.readLine()); }while(N<0);
while(N<=0);
}while(N<0); for (c=1;c<=N;c++)
{ if(N%c==0)
while(N<0);
{ {re=N/10; if (N%c==0)
sdiv cd++;
= sdiv + c;} { cdiv= cdiv+1;
} } }
if(sdiv>N)
System.out.println("La cantidad de digitos }
es:"+cd);
{ System.out.println("Es abundante");
}
} if( cdiv==2)
}
else {System.out.println("No es abundante"); {System.out.println("Es primo:");
} }
} else{
} System.out.println("No es primo:");