Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- int soma_;
- for(int i = 1; i <= 100; i++){
- soma_ = 0;
- for(int a = 1; a < i; a++ ) {
- if(i%a==0) soma_ = soma_ + a;
- }
- if(soma_ == i) printf("%i is um numero perfeito\n\n", i);
- }
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement