Advertisement
huutho_96

Untitled

Apr 6th, 2015
376
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. void main()
  4. {
  5. for (int i = 1; i <= 9; i++)
  6. {
  7. for (int j = 1; j <= 9; j++)
  8. {
  9. for (int h = 1; h <= 9; h++)
  10. {
  11. if ((i * i * i + j * j * j + h * h * h) == (i * 100 + j * 10 + h))
  12. {
  13. cout << i << "\t" << j << "\t" << h << endl;
  14. }
  15. }
  16. }
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement