using System;
//1
public class Program
{
public Program()
Console.WriteLine(IsSorted(new int[] { 1, 2, 3, 4, 5 }));
Console.WriteLine(IsSorted(new int[] { 1, 3, 2, 4, 5 }));
}
public bool IsSorted(int[] numbers)
for (int i = 1; i < numbers.Length; i++) {
if (numbers[i] < numbers[i - 1]){
return false;
return true;
new Program();