读取一个字母并检查其值

#include <stdio.h> 
int main()
{ 
   char cResponse = '\0'; 
   printf(Enter the letter A: ); 
   scanf(%c, &cResponse); 

   if ( cResponse == 'A' ) 
      printf(\nCorrect response\n); 
   else 
      printf(\nIncorrect response\n); 
}

相关文章

for遍历数组
。。。
声明一个计数循环
咕咕咕
#include <stdio.h> int main (void) { printf (&quo...