0% found this document useful (0 votes)
16 views2 pages

Foro

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views2 pages

Foro

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

4 5.

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++)

for(c=1; c<N; c=c+1) {

{ 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:");

You might also like