これの軸名を数値でなく、文字列で表せますか?
たとえば、A軸 B軸 C軸 のように。


/*ハノイの塔*/

#include <stdio.h>

/*--- 円盤をx軸からy軸へ移動 ---*/
void move(int no, int x, int y)
{
if (no > 1)
move(no - 1, x, 6 - x - y);

printf("[%d]を%d軸から%d軸へ移動\n", no, x, y);

if (no > 1)
move(no - 1, 6 - x - y, y);
}

int main(void)
{
int n;/* 円盤の枚数 */
printf("円盤の枚数:");
scanf("%d", &n);
move(n, 1, 3);
return (0);
}