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
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-10-17
Console.WriteLine("我的工资奖金总额是{0}元",salary+ prize);
Console.WriteLine("我的税后收入是{0}元",salary+ prize- tax);
网页bug
Console.WriteLine("我的税后收入是{0}元",salary+ prize- tax);
网页bug
2016-10-16
money>=50000&&money<100000
money>=1000&&money<50000
不懂为什么这么编写会错
money>=1000&&money<50000
不懂为什么这么编写会错
string[] name = { "吴松", "钱东宇", "伏晨", "陈陆", "周蕊", "林日鹏", "何昆", "关欣" };
int[] score = { 89, 90, 98, 56, 60, 91, 93, 85 }; int max =0,x=0; for (int i = 0; i < score.Length; i++)
{ if (score[i] > max) { max = score[i]; x = i; } } Console.Write("分数最高的是{0},分数是{1}",name[x],max); 还需要获取最大值对应的索引
int[] score = { 89, 90, 98, 56, 60, 91, 93, 85 }; int max =0,x=0; for (int i = 0; i < score.Length; i++)
{ if (score[i] > max) { max = score[i]; x = i; } } Console.Write("分数最高的是{0},分数是{1}",name[x],max); 还需要获取最大值对应的索引
//判断本月工资够不够买手机
if (salary >= price)
{
Console.WriteLine("这月工资够买手机!");
}
else
{
Console.WriteLine("这月工资不够买手机!");
}
if (salary >= price)
{
Console.WriteLine("这月工资够买手机!");
}
else
{
Console.WriteLine("这月工资不够买手机!");
}