using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("100~200之间不能被5整除的数为:");
int j = 0;
for (int i = 100; i <= 200; i++)
{
if (i % 5 == 0) continue;
Console.Write("{0} ", i);
j++;
if (j % 10 == 0)
{
Console.WriteLine();
}
}
Console.ReadKey();
}
}
效果图:
评论