namespace Test
{
class Program
{
static void Main(string[] args)
{
int y = 5;
while (y>=1&&y<=5)
{
Console.Write(y+" ");
y--;
}
}
}
}
{
class Program
{
static void Main(string[] args)
{
int y = 5;
while (y>=1&&y<=5)
{
Console.Write(y+" ");
y--;
}
}
}
}
2015-10-12
这里用一个if-else就可以判断了吧,为何用两个if,一个else? if 数组中有不及格的,内层就可以把hasnopass改成true,顺便打印“有人不及格”。外层在用一个else就可以了(既然没有不及格),else 打印“都及格”
2015-10-12