using System;
using System.Collections.Generic;
using System.Text;
namespace Test
{
class Program
{
static void Main(string[] args)
{
/*
* 这是一段提示信息
*/
Console.WriteLine("积跬步,至千里");//打印并换行
}
}
}
using System.Collections.Generic;
using System.Text;
namespace Test
{
class Program
{
static void Main(string[] args)
{
/*
* 这是一段提示信息
*/
Console.WriteLine("积跬步,至千里");//打印并换行
}
}
}
for (int y = 1; y <= 7; y++)
{
for (int x = 1; x <= y; x++)
{
Console.Write(x);
}
Console.WriteLine();
}
{
for (int x = 1; x <= y; x++)
{
Console.Write(x);
}
Console.WriteLine();
}
2016-03-25
for (int x=1;x<=12 ;x++ )//请填写代码
{
Console.WriteLine(x+" ");
}
{
Console.WriteLine(x+" ");
}
2016-03-25
int x = 1;
int sum = 0;//和,初始化为0
while (x <= 30)//循环条件
{
sum += x;
x++;
}
Console.Write("1-30奇数的和:" + (sum - (5 * 3)) / 2);
int sum = 0;//和,初始化为0
while (x <= 30)//循环条件
{
sum += x;
x++;
}
Console.Write("1-30奇数的和:" + (sum - (5 * 3)) / 2);
2016-03-25
int x = 1;
int sum = 0;//和,初始化为0
while (x <= 30)//循环条件
{
if (x%2!=0){//筛选条件
sum += x;
}
x++;
}
Console.Write("1-30奇数的和:"+sum);
int sum = 0;//和,初始化为0
while (x <= 30)//循环条件
{
if (x%2!=0){//筛选条件
sum += x;
}
x++;
}
Console.Write("1-30奇数的和:"+sum);
2016-03-25
int x = 1;
int sum = 0;//和,初始化为0
while (x <= 30)//循环条件
{
if (x%2!=0)//筛选条件
sum += x;
x++;
}
Console.Write("1-30奇数的和:"+sum);
int sum = 0;//和,初始化为0
while (x <= 30)//循环条件
{
if (x%2!=0)//筛选条件
sum += x;
x++;
}
Console.Write("1-30奇数的和:"+sum);
2016-03-24