using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
int i,x,y,z;
for ( i = 100; i < 1000; i++)
{
x = i % 10;
y = (i / 10) % 10;
z = i / 100;
if (i==x*x*x+y*y*y+z*z*z)
{Console.WriteLine("{0}是水仙花数",i);
}
}
Console.ReadKey();
}
}
}
、