I have a do-while loop that is supposed to only accept numbers between [0;26], integers, not unsigned. But when I type a letter or another character that is not a number, it accepts and initializes my integer as 0. Here is the code:
int cifra;
do
{
printf("Insira a cifra a utilizar no intervalo [0;26]: ");
scanf("%d", &cifra);
}while(cifra > 26 || cifra < 0);