問題2 回答


#include<stdio.h>

main()
{
   char c;

   scanf("%c", &c);

   if('a' <= c && c <= 'z'){
      printf("%cは小文字\n", c);
   }

   else if('A' <= c && c <= 'Z'){
      printf("%cは大文字\n", c);
   }

   else{
      printf("%cはアルファベットではありません\n", c);
   }
}


[ 戻る ]