for (int x=0;x<=12 ;x++ )//请填写代码
{
Console.WriteLine(x+" ");
}
{
Console.WriteLine(x+" ");
}
2016-10-21
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-10-21
int y = 5;
while (y>0)//请输入
{
Console.Write(y+" ");
//请输入
y--;
}
while (y>0)//请输入
{
Console.Write(y+" ");
//请输入
y--;
}
2016-10-21
static void Main(string[] args)
{
int score = 96;//分数
//判断
if (score > 95)
{//分支1
Console.WriteLine("奖励一辆自行车");
}
}
{
int score = 96;//分数
//判断
if (score > 95)
{//分支1
Console.WriteLine("奖励一辆自行车");
}
}
2016-10-20
Console.WriteLine((int)x>y);
Console.WriteLine((double)x>=y);
Console.WriteLine((double)x>=y);
2016-10-20