public static void hanoi(char startpeg, char endpeg, char temppeg, int num)
hanoi(startpeg,temppeg, endpeg, num -1);
Console.WriteLine("disks moved from {0} to {1}", startpeg, endpeg);
hanoi(temppeg,endpeg, startpeg, num -1);
public static void Main()
Console.WriteLine("Hello World");
hanoi(startpeg, endpeg, temppeg, n);