文字列入力のあるC#分割読み取りグループ
using System;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
string str = Console.ReadLine();
string[] a = str.Split(" ");
bool flag = true;
for(int i = 1; i < a.Length; i++)
{
if (Convert.ToInt32(a[i]) > Convert.ToInt32(a[i-1]))
{
flag = false;
}
}
if (true == flag)
{
Console.WriteLine("该数列已排序");
}
else
{
Console.WriteLine("该数列未排列");
}
}
}
}