] args)
{
for( int i=100; i<=999; i++)
if( IsShuixian(i) )
Console.WriteLine(i);
Console.ReadKey();
}
// 判断是否是水仙数
static public bool IsShuixian(int n)
{
int sum = 0;
int s=n;
while (n > 0)
{
int k = n % 10;
sum += k * k * k;
n /= 10;
}
return s == sum;
}