#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<math.h>
void main()
{
int i = 100;
int a, b, c;
do
{
a = i / 100;
b = i / 10 % 10;
c = i % 10;
if (pow(a, 3) + pow(b, 3) + pow(c, 3) == i)
{
printf("水仙花数字为:%d\n", i);
}
i++;
}while (i <= 999);
return ;
}
标签:do,10,--,pow,int,while,100 From: https://blog.51cto.com/u_16073189/6202825