for (int i = 100; i < 1000; i++)
{
int ge = i % 10;
int shi = (i / 10) % 10;
int bai = i / 100;
if (i == ge * ge * ge + shi * shi * shi + bai * bai * bai)
{
console.writeline(i);
}
}
c#学习笔记-水仙花数
于 2023-06-03 10:13:21 首次发布