using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplicationl { class Program { static void Main ...
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplicationl
{
class Program
{
static void Main(string[] args)
{
int number = 1; //當前的數字
while (number <= 1000)
{
//判斷當前的數字能否被3整除
if (number % 3 == 0)
{
Console.WriteLine(number);
}
number+;//再看下一個數
}
}
}
}