Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // HomeWork-Week-11.cpp :
- //
- #include <iostream>
- using namespace std;
- float idealNum(float a, float b)
- {
- for (int i = a; i < b; i++)
- {
- int num = 0;
- for (int j = 1; j < i; j++)
- {
- if (i % j == 0)
- {
- num += j;
- }
- }
- if (num == i && num)
- {
- cout << num << " \n";
- }
- }
- return 0;
- }
- int main()
- {
- //idealNumber
- //idealNum(0, 9000);
- }
Add Comment
Please, Sign In to add comment