fork download
  1. #include <stdio.h>
  2.  
  3. int main(void)
  4. {
  5. int a;
  6.  
  7. printf("整数を入力せよ:%d\n"); scanf("%d", &a);
  8.  
  9. switch (a % 2){
  10. case 0 : puts("その数は偶数です。"); break;
  11. case 1 : puts("その数は奇数です。"); break;
  12. }
  13.  
  14. return 0;
  15. }
  16.  
Success #stdin #stdout 0.01s 5324KB
stdin
5
stdout
整数を入力せよ:126114936
その数は奇数です。