My problem is that according to a whole number, for example 1, the conditional would be fulfilled and therefore, I would have to read the data I am requesting, of a character type. When performing this action, at the time of entering the number 1, the program ends without reading my character data. This is an example, it is just a test and it is short, I would appreciate it if you could help me with this doubt, thanks: The declared variables are random words, the important thing is the code.
#include<stdio.h>
int main(){
int torta;
char dia;
scanf("%d",&torta);
if(torta == 1){
printf("Ingresa una letra");
scanf("%c",&dia);
}
return 0;
}