問題3 回答


#include<stdio.h>

main()
{
   int x = 0, count = 0;
   char str[256];

   scanf("%s", str);

   while(str[x] != '\0'){
      if(str[x] == 'a'){
         count++;
      }
      x++;
   }

   printf("%d\n", count);
}


[ 戻る ]