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();//换行
2017-05-21
if(salary>price)//请在这里补充条件判断
{
Console.WriteLine("这月工资够买手机!");
}
else
{
Console.WriteLine("这月工资不够买手机!");
}
}
}
{
Console.WriteLine("这月工资够买手机!");
}
else
{
Console.WriteLine("这月工资不够买手机!");
}
}
}
string[,] name = { { "吴松", "89" }, { "钱东宇", "90" }, { "伏晨", "98" } };
int max = 0;
int m = 0;
for (int i = 0; i < name.GetLength(0); i++)
{
int n;
n = Convert.ToInt32(name[i, 1]);
if (n > max)
{
max = n;
m = i;
}
}
Console.WriteLine("最高是{0},分数为{1}",max,name[m,0]);
int max = 0;
int m = 0;
for (int i = 0; i < name.GetLength(0); i++)
{
int n;
n = Convert.ToInt32(name[i, 1]);
if (n > max)
{
max = n;
m = i;
}
}
Console.WriteLine("最高是{0},分数为{1}",max,name[m,0]);
string[,] name = { { "吴松", "89" }, { "钱东宇", "90" }, { "伏晨", "98" } };
int max = 0;
int m = 0;
for (int i = 0; i < name.GetLength(0); i++)
{
int n;
n = Convert.ToInt32(name[i, 1]);
if (n > max)
{
max = n;
m = i;
}
}
Console.WriteLine("最高是{0},分数为{1}",max,name[m,0]);
int max = 0;
int m = 0;
for (int i = 0; i < name.GetLength(0); i++)
{
int n;
n = Convert.ToInt32(name[i, 1]);
if (n > max)
{
max = n;
m = i;
}
}
Console.WriteLine("最高是{0},分数为{1}",max,name[m,0]);
2017-05-19
int x=1;
bool a = ++x * x > 3;
bool b =true ;//请赋值
Console.WriteLine(a==b);
a的值是4,4大于3,所以得到true
bool a = ++x * x > 3;
bool b =true ;//请赋值
Console.WriteLine(a==b);
a的值是4,4大于3,所以得到true
2017-05-19