using System;
public class Program
{
public static void Main()
Rotate obj = new Rotate();
obj.rotation();
}
class Rotate
int [] arr = new int[]{1,2,3,4,5};
public void rotation()
int x = arr[arr.Length-1];
int j;
//Console.WriteLine(x);
int i = arr.Length-1;
Console.WriteLine("Array after rotation is ");
for(j = i;j>0;j--)
arr[j]=arr[j-1];
Console.WriteLine(arr[j]);
arr[0]=x;
Console.WriteLine(arr[0]);