**It is my humble request if I can get minior help with function definition at the end where its says--- int countvowels (string test) { **
#include <iostream>
using namespace std;
//function prototype
bool is_vowel (char c);
//is_vowel(c) returns true if character c is a vowel and false otherwise
void testdrivera();
//returns the number of uppercase and lowercase vowel in string test
void testdriverb();
//returns the number of vowels
int countvowels (string test); // defines variable string
//count_vowels(test) returns the number of vowels in string(test)
//test driver for b
int main ()
``
testdrivera ();
return 0;
}
void testdrivera ()
{
string test = "Programming language IS FUN to learn. ";
for (int i = 0; i < test.size(); i++)
{
if (is_vowel(test [i]))
cout << "The letter followed by is a vowel: " << test [i] << endl;
else
cout << "The letter followed by is NOT a vowel: " << test [i] << endl;
}
}
void testdriveb()
{
string test = "Programing language IS FUN to learn. ";
int nvowels = 0;
nvowels = countvowels (test);
cout << "Number of vowels: " << nvowels << endl;
}
bool is_vowel (char c)
{
switch (c)
{
case 'a': case 'A': case 'e': case 'E': case 'i': case 'I':
case 'o': case 'O': case 'u': case 'U':
return true;
}
return false;
}
int countvowels (string test)
{
return 0;
}