// cub_perfect.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include #include int main(int argc, char* argv[]) { int a,b,c,d; a=1; while (a<=97) { b=1; while (b<=98) { c=1; while (c<=99) { d=(int)pow((double)(a*a*a+b*b*b+c*c*c),(double)(1/3)); printf("%d\n",d); if ((d<=100)&&((d*d*d)==(c*c*c)+(a*a*a)+(b*b*b))) printf("\n %d,%d,%d--%d",a,b,c,d); c++; } b++; } a++; printf("%d\n",d); } return 0; }