求助,着急~~~
新手学习C#中,要求“在控制台输输出100以内所有被3和5整除的数。”菜鸟求助大神,速救,不胜感激!!!
程序代码: for (int i = 1; i <= 100; i++)
{
if (i % 15 == 0)
Console.WriteLine(i);
}
Console.ReadKey();
//------------------------------------------------------------
int j = 1;
do
{
if (j % 3 == 0 && j % 5 == 0)
Console.WriteLine(j);
j++;
} while (j <= 100);
