string[] names = new string[]{"吴松","钱东宇","伏晨","陈陆","周蕊","林日鹏","何昆","关欣"};
int[] scores = {89,90,98,56,60,91,93,85};
int max = 0;
string name = "";
for(int i=0;i<scores.Length;i++){
if(scores[i]>max){
max = scores[i];
name = names[i];
}
}
Console.Write("分数最高的是{0},分数是{1}",name, max);
int[] scores = {89,90,98,56,60,91,93,85};
int max = 0;
string name = "";
for(int i=0;i<scores.Length;i++){
if(scores[i]>max){
max = scores[i];
name = names[i];
}
}
Console.Write("分数最高的是{0},分数是{1}",name, max);
string[] job = new String[4];
job[0] = "经理";
job[1] = "项目主管";
job[2] = "技术总监";
job[3] = "财务主管";
for (int i = 0; i < 4 ; i++)
{
Console.Write(job[i]);//打印职位
}
job[0] = "经理";
job[1] = "项目主管";
job[2] = "技术总监";
job[3] = "财务主管";
for (int i = 0; i < 4 ; i++)
{
Console.Write(job[i]);//打印职位
}
2017-10-14
string[] name = {"吴松","钱东宇","伏晨","陈陆","周蕊","林日鹏","何昆","关欣"};
int[] score = {89,90,98,56,60,91,93,85};
int max=0;
for(int i=0;i<score.Length;i++)
{
if(score[i]>score[max])
max=i;
}
Console.Write("分数最高的是{0},分数是{1}",name[max],score[max]);
int[] score = {89,90,98,56,60,91,93,85};
int max=0;
for(int i=0;i<score.Length;i++)
{
if(score[i]>score[max])
max=i;
}
Console.Write("分数最高的是{0},分数是{1}",name[max],score[max]);
namespace Test
{
class bra
{
static void Main(string[] args)
{
int A = 1;int B = 2;int C = 3;
int D = 4;int E = 5;int F = 6;
int cup = C;
if (cup >= D)
Console.WriteLine("菇凉请留下电话,谢谢。");
else
Console.WriteLine("对不起,当我知道你还没D罩杯的时候,我们就已经无缘了。");
}
}
}
{
class bra
{
static void Main(string[] args)
{
int A = 1;int B = 2;int C = 3;
int D = 4;int E = 5;int F = 6;
int cup = C;
if (cup >= D)
Console.WriteLine("菇凉请留下电话,谢谢。");
else
Console.WriteLine("对不起,当我知道你还没D罩杯的时候,我们就已经无缘了。");
}
}
}
2017-10-12
for (int y = 1; y <= 7; y++)
{
for (int x = 1; x <= 7; x++)
{
if(x==y || x==8-y)
Console.Write("O");
else Console.Write(".");
}
Console.WriteLine();
{
for (int x = 1; x <= 7; x++)
{
if(x==y || x==8-y)
Console.Write("O");
else Console.Write(".");
}
Console.WriteLine();