for (int x = 1; x <= 7; x++)
{
Console.Write(x);
if(x==y)
break;
{
Console.Write(x);
if(x==y)
break;
2018-04-16
for(int i=0;i<score.Length;i++)
{
if(score[i]>max)
{
max=score[i];
x=i;
}
}
Console.WriteLine("分数最高的是{0},分数是{1}",name[x],score[x]);
{
if(score[i]>max)
{
max=score[i];
x=i;
}
}
Console.WriteLine("分数最高的是{0},分数是{1}",name[x],score[x]);
string[] name=new string[]{"吴松","钱东宇","伏晨","陈陆","周蕊","林日鹏","何昆","关欣"};
int[] score=new int[]{89,90,98,56,60,91,93,85};
int x=0;
int max=0;
int[] score=new int[]{89,90,98,56,60,91,93,85};
int x=0;
int max=0;
namespace Test
{
class Program
{
static void Main(string[] args)
{
int y = 5;
while ( y <=5 && y >= 1 )//请输入
{
Console.Write(y+" ");
y--;//请输入
}
}
}
}
{
class Program
{
static void Main(string[] args)
{
int y = 5;
while ( y <=5 && y >= 1 )//请输入
{
Console.Write(y+" ");
y--;//请输入
}
}
}
}
2018-04-14
string[] name ={"吴松","钱东宇","伏晨","陈陆","周蕊","林日鹏","何昆","关欣"};
int[] score = {89,90,98,56,60,91,93,85};
for (int i=1;i<score.Length;i++)
{
if (score[0]<score[i])
{
score[0]=score[i];
name[0]=name[i]
}
int[] score = {89,90,98,56,60,91,93,85};
for (int i=1;i<score.Length;i++)
{
if (score[0]<score[i])
{
score[0]=score[i];
name[0]=name[i]
}
for (int y = 1; y <= 7; y++)
{
for (int x = 1; x <= y; x++)
//*第一行,y为1,x只循环一次,只为1,
//*第二行,y为2,x只循环二次,为12.
//*以此类推。。。
{ Console.Write(x); }
Console.WriteLine();
{
for (int x = 1; x <= y; x++)
//*第一行,y为1,x只循环一次,只为1,
//*第二行,y为2,x只循环二次,为12.
//*以此类推。。。
{ Console.Write(x); }
Console.WriteLine();
2018-04-10