int y = 5;
while (y != 0)//请输入
{
Console.Write(y + " ");
y--;//请输入
}
while (y != 0)//请输入
{
Console.Write(y + " ");
y--;//请输入
}
2016-06-07
static void Main(string[] args)
{
int[] fenshu = { 90, 65, 88, 70, 46, 81, 100, 68 };
string [] name = {"景珍","林惠洋","成蓉","洪南昌","龙玉民","单江开","田武山","王三明"};
ArrayList mingzi = new ArrayList();//声明动态数组
double pingjun = 0.0;
{
int[] fenshu = { 90, 65, 88, 70, 46, 81, 100, 68 };
string [] name = {"景珍","林惠洋","成蓉","洪南昌","龙玉民","单江开","田武山","王三明"};
ArrayList mingzi = new ArrayList();//声明动态数组
double pingjun = 0.0;
int[] fenshu = { 89, 90, 98, 56, 60, *, *, * };
string[] mingzi = { "吴松", "钱东宇", "伏晨", *, *, *, *, *};
int max = 0;
string ming = "a";
for (int a = 0;a < fenshu.Length;a++)
{
if (max < fenshu[a])
{
max = fenshu[a];
ming = mingzi[a];
}
}
Console.WriteLine("分数最高的是{0},分数是{1}",ming,max);
没过
string[] mingzi = { "吴松", "钱东宇", "伏晨", *, *, *, *, *};
int max = 0;
string ming = "a";
for (int a = 0;a < fenshu.Length;a++)
{
if (max < fenshu[a])
{
max = fenshu[a];
ming = mingzi[a];
}
}
Console.WriteLine("分数最高的是{0},分数是{1}",ming,max);
没过
static void Main(string[] args)
{
double x = 13.9, y = 24.4;
double sum = x + y;
double avg=sum/2;
Console.WriteLine(avg);
}
}
{
double x = 13.9, y = 24.4;
double sum = x + y;
double avg=sum/2;
Console.WriteLine(avg);
}
}
2016-06-06
string[,] sc = { {"吴松","89" }, {"钱东宇","90" }, { "伏晨","98"}, {"陈陆","56" }, {"周蕊","60" }, {"林日鹏","91" }, {"何昆","93" }, {"关欣","85" } };int scoreMax=int.Parse(sc[0,1]); int x=0;for(int i=0;i<sc.GetLongLength(0);i++){if (int.Parse(sc[i,1]) > scoreMax){scoreMax =int.Parse (sc[i,1])};x=i;Console.Write{省略}