代码示例:
#include <stdio.h>
#define B(X) (X)*(X)*(X)
int main(void)
{
int i = 0 ;
int a = 0 , b = 0 , c = 0 ;
for (i = 100 ; i < 1000 ; i ++)
{
a = i/100;
b = i/10%10;
c = i%10;
if (i == B(a)+B(b)+B(c))
{
printf("%d\n",i);
}
}
return 0;
}