Как получить int из stdio в C?

Возникли серьезные проблемы с этим ...

printf("> ");
int x = getchar();

printf("got the number: %d", scanf("%d", &x));

output

> 1234
got the number: 1
26
задан gsamaras 14 May 2016 в 03:04
поделиться