Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- for(int i = 100; i <= 999; i++) {
- int z = i % 10;
- int y = (i / 10) % 10;
- int x = i / 100;
- if(x + y * y + z * z * z == i) {
- printf("%d ", i);
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement