#include<iostream>
using namespace std;
int main()
{
int x,a, b, c;
for (x = 100; x < 1000; x = x + 1)
{
a = x / 100;
b = (x / 10) % 10;
c = (x % 10);
if (x == (a*a*a) + (b*b*b) + (c*c*c))
cout << x << endl;
else;
}
system("pause");
return 0;
}
Last modification:December 5th, 2018 at 07:40 pm
© 允许规范转载