Qualcuno gentilmente mi può spiegare come lavora la funzione tower??
codice:
#include <stdio.h>
void tower (int, int, int, int);

int main()
{ 
   int n;
   
   printf ("Enter the starting number of disks: ");
   scanf ("%d", &n);
   tower (n, 1, 3, 2);
   
   system ("pause");
   return 0;
}
void tower (int c, int start, int end, int temp)
{ 
   if (c == 1){ 
      printf ("%d --> %d\n", start, end);
      return;}   

   tower (c - 1, start, temp, end);

   printf ("%d --> %d\n", start, end);

   tower (c - 1, temp, end, start);
}