Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- void main()
- {
- for (int i = 1; i <= 9; i++)
- {
- for (int j = 1; j <= 9; j++)
- {
- for (int h = 1; h <= 9; h++)
- {
- if ((i * i * i + j * j * j + h * h * h) == (i * 100 + j * 10 + h))
- {
- cout << i << "\t" << j << "\t" << h << endl;
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement