for (int i = 100; i <= 999; i++)//遍历所有数据标签:10,+%,int,ge,shi,水仙花,bai From: https://blog.51cto.com/u_15458814/5883459
{
int ge = i % 10;//取出个位
int shi = i / 10 % 10;//取出10位
int bai = i / 100;//取出百位
//筛选
if (ge*ge*ge + shi*shi*shi + bai*bai*bai == i)//判断条件
{
printf("%d^3+%d^3+%d^3=%d\n", ge, shi, bai, i);//打印
}
}