盖楼 int x = 1;
int sum = 0;//和,初始化为0
while (x <= 30)//循环条件
{
if (x%2==1)//筛选条件
sum += x;
x++;
}
int sum = 0;//和,初始化为0
while (x <= 30)//循环条件
{
if (x%2==1)//筛选条件
sum += x;
x++;
}
2016-10-18
发月饼啦!switch (job)
{
case "局长": Console.Write("发双黄月饼"); break;
case "处长": Console.Write("发蛋黄月饼"); break;
case "科长": Console.Write("发枣泥月饼"); break;
default: Console.Write("发五仁月饼"); break;
}
{
case "局长": Console.Write("发双黄月饼"); break;
case "处长": Console.Write("发蛋黄月饼"); break;
case "科长": Console.Write("发枣泥月饼"); break;
default: Console.Write("发五仁月饼"); break;
}
2016-10-18
int x=1;
bool a = ++x * x > 3; // 我理解啊,“++“是一元运算,所以实际 bool a = Ture(x=++x;x=x*x;bool a = 4>3,返回Ture)
bool b = a;//请赋值
Console.WriteLine(a==b);
bool a = ++x * x > 3; // 我理解啊,“++“是一元运算,所以实际 bool a = Ture(x=++x;x=x*x;bool a = 4>3,返回Ture)
bool b = a;//请赋值
Console.WriteLine(a==b);
2016-10-18
string text;//请填写代码
text =(year/4)==1? "闰年":"平年";
text =(year/4)==1? "闰年":"平年";
2016-10-18
正确答案: if (x >= y)
{
if (x >= 5)
Console.WriteLine("5");
}
else
if (y >= 6)
Console.WriteLine("6");
else
Console.WriteLine("7");
{
if (x >= 5)
Console.WriteLine("5");
}
else
if (y >= 6)
Console.WriteLine("6");
else
Console.WriteLine("7");
2016-10-18
最赞回答 / qq_夜星辰_0
using System;using System.Collections.Generic;using System.Text;namespace Test{ class Program { static void Main(string[] args) { //请完善代码 for(int i = 1; i<=7 ; i++){ for(int j=1;j<=...
2016-10-18