Vowel Counter
C
Medium
4 views
Problem Description
Count the vowels (a, i, i, o, u) in the string. Case-insensitively. Also keep a separate count of each vowel. You can create a histogram.
Official Solution
#include <stdio.h>
#include <ctype.h>
int main() {
char str[200];
int a = 0, e = 0, i = 0, o = 0, u = 0;
int total = 0;
int idx;
printf("Enter a string: ");
fgets(str, sizeof(str), stdin);
for (idx = 0; str[idx] != '