Submission
Status:
Compilation Error
Score: 0
User: foldnut
Problemset: บวกเลขฐาน
Language: cpp
Time: 0.000 second
Submitted On: 2024-10-11 14:32:08
#include <stdio.h>
int main(){
char str[500];
int vowel[5] = {0,0,0,0,0};
gets(str);
int i = 0;
while(str[i] != '\0'){
if(str[i] >= 65 && str[i] <= 90){
str[i] = str[i] + 32;
}
if(str[i] == 'a') vowel[0]++;
if(str[i] == 'e') vowel[1]++;
if(str[i] == 'i') vowel[2]++;
if(str[i] == 'o') vowel[3]++;
if(str[i] == 'u') vowel[4]++;
i++;
}
for(int i = 0;i<5;i++){
printf("%d ", vowel[i]);
}
}