string[] names =new string [] { "吴淞", "钱东宇", "伏晨", "陈陆", "周蕊", "林日鹏", "何昆", "关欣" };
int[] score = new int []{ 89, 90, 98, 50, 60, 91, 93, 85 };
int y = 0;
int a = 0;
for(int i=0;i<names.Length;i++)
{
if (y<score[i])
{
y = score[i];
a = i;
}
}
Console.WriteLine("分数最高的是" + names[a]+",分数是" + score[a]);
int[] score = new int []{ 89, 90, 98, 50, 60, 91, 93, 85 };
int y = 0;
int a = 0;
for(int i=0;i<names.Length;i++)
{
if (y<score[i])
{
y = score[i];
a = i;
}
}
Console.WriteLine("分数最高的是" + names[a]+",分数是" + score[a]);
\\这个答案有什么问题吗,提交不了。
if(money>=100000)
{Console.WriteLine("送一台微波炉");}
else if(money>=50000)
{Console.WriteLine("送一套茶具");}
else if(money>=10000)
{Console.WriteLine("送一袋大米");}
else
{Console.WriteLine("没有礼品");}
if(money>=100000)
{Console.WriteLine("送一台微波炉");}
else if(money>=50000)
{Console.WriteLine("送一套茶具");}
else if(money>=10000)
{Console.WriteLine("送一袋大米");}
else
{Console.WriteLine("没有礼品");}
最新回答 / weibo_林夕君Kyu_0315069
using System;using System.Collections.Generic;using System.Text;namespace Test{ class Program { static void Main(string[] args) { int x;//循环计数变量 x=5;//行① 请填写计数变量的初始化语句 while ( x&...
2016-10-11
最新回答 / qq_Ontheway_9
Console.WriteLine("按2键退出"); while (Console.ReadKey().KeyChar != '2') { }
2016-10-10
namespace Test
{
class Program
{
static void Main(string[] args)
{
int x;
for ( x=1;x<=12;x++)//请填写代码
{
Console.WriteLine(x+" ");
}
}
}
}
{
class Program
{
static void Main(string[] args)
{
int x;
for ( x=1;x<=12;x++)//请填写代码
{
Console.WriteLine(x+" ");
}
}
}
}
2016-10-10