Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main ()
- {
- int atual, x, divi=0, qtd=0;
- for ( atual=1; atual<= 10000; atual++)
- {
- divi = 0;
- for (x=1; x < atual; x++)
- {
- if ((atual%x)==0)
- divi = divi + x;
- }
- if (atual == divi){
- printf("%d ",atual);
- qtd++;
- }
- }
- printf ("%d numes achados!", qtd);
- system ("pause");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement