首页 > 代码库 > 水仙花 程序

水仙花 程序

using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConsoleApplication1{    class Program    {        static void Main(string[] args)        {            int num,a, b, c;            for (num = 100; num < 1000; num++)            {                a = num / 100;                b = num % 100 / 10;                c = num % 10;                if (num == a * a * a + b * b * b + c * c * c)                    Console.WriteLine(num);            }            Console.ReadLine();        }    }}

水仙花 程序