C#趣味程序---个位数为6,且能被3整出的五位数

using System;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            int count = 0;
            int k;
            for (int i = 1000; i < 9999; i++)
            {
                k = i * 10 + 6;
                if (k % 3== 0)
                {
                    Console.WriteLine(k);
                    count++;
                }
            }
            Console.WriteLine(count);   
        }
    }
}

原文地址:https://www.cnblogs.com/gcczhongduan/p/5080237.html