c#:问大佬们一个特别弱智的问题(本人新生)
#个人感觉没问题但PTA显示编译错误。
using System;

namespace ConsoleApp5
{
class Program
{
static void Main(string[] args)
{
int c = 0,d=0;
int a = int.Parse(Console.ReadLine());
string op = Console.ReadLine();
string[] vs = op.Split(" ");
int[] b = Array.ConvertAll<string,int>(vs, int.Parse);
c = b[0];
for (int i = 0; i < a; i++)
{
if(b[i]>c)
{
c = b[i];
d = i;
}
}
Console.WriteLine(c.ToString() + " " + d.ToString());
}
}
}

相关文章:

  • 2021-12-08
  • 2022-12-23
  • 2022-02-25
  • 2021-11-05
  • 2021-07-23
  • 2021-12-23
  • 2022-12-23
  • 2021-11-05
猜你喜欢
  • 2021-10-28
  • 2022-12-23
  • 2021-09-04
  • 2022-01-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案