fork download
  1. #include <stdio.h>
  2.  
  3. int main(void)
  4. {
  5. char ko , kq;
  6.  
  7. printf("A~Cまでの文字を入力してください。\n");
  8.  
  9. kq = getchar ();
  10.  
  11. if (kq == 'A' || kq == 'a' || kq == 'B' || kq == 'b'|| kq == 'C' || kq == 'c')
  12. printf("正解です。\n");
  13. else
  14. printf("間違いです。\n");
  15.  
  16. printf("処理を終了します。\n");
  17.  
  18. return 0;
  19. }
Success #stdin #stdout 0s 5320KB
stdin
A
stdout
A~Cまでの文字を入力してください。
正解です。
処理を終了します。