#include <stdio.h>
#include <string.h>

#define STRING_SIZE 30

void inputString(char user_input[])
{
  printf("Please enter the string: ");
  fgets(user_input, STRING_SIZE, stdin);
}

void countVowels(char user_input[], int vowels[])
{
    int position = 0;
    while (user_input[position] != '\n')
    {
        if (user_input[position] == 'a' || user_input[position] == 'A') vowels[0]++;
        if (user_input[position] == 'e' || user_input[position] == 'E') vowels[1]++;
        if (user_input[position] == 'i' || user_input[position] == 'I') vowels[2]++;
        if (user_input[position] == 'o' || user_input[position] == 'O') vowels[3]++;
        if (user_input[position] == 'u' || user_input[position] == 'U') vowels[4]++;
        position++;
    }
}

void printVowels(int vowels[])
{
    printf("a: %d\n", vowels[0]);
    printf("e: %d\n", vowels[1]);
    printf("i: %d\n", vowels[2]);
    printf("o: %d\n", vowels[3]);
    printf("u: %d\n", vowels[4]);
}

int main(void)
{
  char user_input[STRING_SIZE] = {'\0'};
  int vowels[5] = {0};
  
  inputString(user_input);
  
  countVowels(user_input, vowels);
  
  printVowels(vowels);

  return 0;
}