求88888的最大三位约数

   
 1 using System;
 2 using System.Collections.Generic;
 3 using System.Text;
 4 
 5 namespace Test
 6 {
 7     class Program
 8     {
 9         static void Main(string[] args)
10         {
11             int number;
12             Console.WriteLine("Input number:");
13             number = Convert.ToInt32(Console.ReadLine());
14             for (int i = 999; i >= 100; i--)
15             if (number % i == 0)
16             {
17                 Console.Write("The max factor with 3 digits in {0} is {1}", number, i);
18                 break;
19             }
20         }
21     }
22 }
posted @ 2007-10-29 13:29  love .net FrameWork  阅读(335)  评论(0编辑  收藏  举报