using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace 吸奶
{
class Program
{
static void Main(string[] args)
{
int n = 0;
Console.WriteLine("300以内能被3,5整除的自然数:");
for (int i = 3; i <= 300; i++)
{
if (i % 3 == 0 && i % 5 == 0)
{
Console.Write("{0} ", i);
n++;
if (n % 5 == 0)
Console.WriteLine();
}
}
Console.Read();
}
}
}
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace 吸奶
{
class Program
{
static void Main(string[] args)
{
int n = 0;
Console.WriteLine("300以内能被3,5整除的自然数:");
for (int i = 3; i <= 300; i++)
{
if (i % 3 == 0 && i % 5 == 0)
{
Console.Write("{0} ", i);
n++;
if (n % 5 == 0)
Console.WriteLine();
}
}
Console.Read();
}
}
}