#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
如果觉得我的文章对您有帮助,请随意赞赏:)