using System;
public class Program
{
public static void Main()
int[]a=new int[5]{1,2,3,4,5};
Console.WriteLine(IsConsecutive(a));
}
static bool IsConsecutive (int[] a)
for (int i = 0; i < a.Length - 1; i++)
if (a[i]!=a[i+1]-1)
return false;
return true;