fork download
  1. #include <stdio.h>
  2. int main() {
  3. char ch;
  4. printf("1文字を入力してください: ");
  5. scanf(" %c", &ch); // Space before %c to ignore preceding whitespace
  6. printf("入力された文字: %c\n", ch);
  7. return 0;
  8. }
  9.  
Success #stdin #stdout 0s 5296KB
stdin
Standard input is empty
stdout
1文字を入力してください: 入力された文字: