namespace Test
{
class Program
{
static void Main(string[] args)
{
int score = 96;//分数
if(score >95)//判断
{//分支1
Console.WriteLine("要什么自行车");
}
}
}
}
{
class Program
{
static void Main(string[] args)
{
int score = 96;//分数
if(score >95)//判断
{//分支1
Console.WriteLine("要什么自行车");
}
}
}
}
2017-07-21
string[,] num = new string[8, 2] { { "吴松", "89" }, { "钱东宇", "90" }, ...}
int a = 0, max = int.Parse(num[0,1]);
for (int i = 0; i < num.GetLongLength(0); i++)
{ if (int.Parse(num[i,1])>max)
{ max = int.Parse(num[i,1]);
a = i; }
}
Console.WriteLine("分数最高的是" + num[a, 0]+"," + "分数是"+max);
int a = 0, max = int.Parse(num[0,1]);
for (int i = 0; i < num.GetLongLength(0); i++)
{ if (int.Parse(num[i,1])>max)
{ max = int.Parse(num[i,1]);
a = i; }
}
Console.WriteLine("分数最高的是" + num[a, 0]+"," + "分数是"+max);
using System;
using System.Collections.Generic;
using System.Text;
namespace Test
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("6");
}
}
}
using System.Collections.Generic;
using System.Text;
namespace Test
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("6");
}
}
}
2017-07-20
int highest = 0;
int x=0 ;
for (int i = 0;i<score.Length;i++)
{
if ( score[i] > highest)
{
highest = score[i];
x=i;
}
}
Console.Write("分数最高的是"+ names[x]+","+"分数是"+score[x]+".");
int x=0 ;
for (int i = 0;i<score.Length;i++)
{
if ( score[i] > highest)
{
highest = score[i];
x=i;
}
}
Console.Write("分数最高的是"+ names[x]+","+"分数是"+score[x]+".");