Загрузка данных


#include <stdio.h>

void hanoi(int n, int from, int to, int aux) {
    if (n == 1) {
        printf("Переместите диск с %d на %d\n", from, to);
        return;
    }
    hanoi(n - 1, from, aux, to);
    printf("Переместите диск с %d на %d\n", from, to);
    hanoi(n - 1, aux, to, from);
}

int main(void) {
    int n;
    if (scanf("%d", &n) == 1) {
        hanoi(n, 1, 3, 2);
    }
    return 0;
}