string[,] a = 二維數組 int max = 0; for (int i = 0; i < a.GetLength(0); i++)
{if (int.Parse(a[i, 1]) > max) {
max = int.Parse(a[i, 1]); } } for (int x = 0; x < a.GetLength(0); x++){ if (int.Parse(a[x, 1]) == max) { Console.WriteLine("分數最高的是{0},分數是{1}", a[x, 0], max); break; } }
{if (int.Parse(a[i, 1]) > max) {
max = int.Parse(a[i, 1]); } } for (int x = 0; x < a.GetLength(0); x++){ if (int.Parse(a[x, 1]) == max) { Console.WriteLine("分數最高的是{0},分數是{1}", a[x, 0], max); break; } }
using System;
using System.Collections.Generic;
using System.Text;
namespace Test
{
class Program
{
static void Main(String[]args)
{
Console.WriteLine("今日事,今日畢。");
}
}
}
這樣就可以,把class和static前面空格至最前,我交了可以了
using System.Collections.Generic;
using System.Text;
namespace Test
{
class Program
{
static void Main(String[]args)
{
Console.WriteLine("今日事,今日畢。");
}
}
}
這樣就可以,把class和static前面空格至最前,我交了可以了
2017-06-26
提交也沒報錯,但是vs運行是一片空白
static void Main(string[] args)
{
for (int y = 1; y <= 7; y++)
{
for (int x = 7; x<=1; x--)
{
Console.Write(x);
}
Console.WriteLine();//換行
}
}
static void Main(string[] args)
{
for (int y = 1; y <= 7; y++)
{
for (int x = 7; x<=1; x--)
{
Console.Write(x);
}
Console.WriteLine();//換行
}
}
2017-06-26
if (x >= y)
if (x >= 5)
Console.WriteLine("6");
else
if (y >= 6)
Console.WriteLine("6");
else
Console.WriteLine("6");
if (x >= 5)
Console.WriteLine("6");
else
if (y >= 6)
Console.WriteLine("6");
else
Console.WriteLine("6");
2017-06-26