为什么scanf()不讨论任何输入[重复]

I am a 12-year kid learning C during the lockdown, while I was making a program for testing if a person has COVID-19 I ran in an issue where the program does not ask an input for the code scanf("%c",&b);

#include <stdio.h>



int main(){

printf("                  THIS IS A COVID-19 TESTER PLEASE ANSWER THE QUESTIONS PROPERLY \n \n \n");
printf("  FOR NO PLEASE TYPE: n    \n  FOR YES PLEASE TYPE: y \n");
char a,b,c,d,e,f;

printf("\n DO YOU HAVE HIGH FEVER: ");
scanf("%c",&a);

printf(" DO YOU HAVE COLD: ");
scanf("%c",&b);



return 0;
}

After typing and executing this code I get an error in the scanf("%c",&b); as when I execute it it does not ask input for scanf("%c",&b);

请帮我解决这个问题

评论