In this program you will write two functions and call them frommain. The first f
ID: 3618556 • Letter: I
Question
In this program you will write two functions and call them frommain. The first function will simply write out your assignmentnumber and your name. The second function will be avalue-returning function, isVowel, that returns the value true if agiven character is a vowel and otherwise returns the valuefalse.
Test your function by writing a main program that calls thefirst function and then your reads in a character and printswhether or not it is a vowel.
Here is the prototype:
bool isVowel(char);
Extra 5 points.
Enter your name and count how many vowels there are. Youwill need the to use the following:
cin.get(ch);
while (ch != ' ')
Print out your name and the number of vowels in your name.
Below is the example from your textbook that may help you:
// This program uses a function thatreturns true or false.
#include <iostream>
usingnamespace std;
bool isEven(int);
int main()
{
int val;//Holds the value to be tested
cout << "Enter an integerand I will tell you ";
cout << "if it is even or odd: ";// Indicate whether it is even or odd
cin >> val;
if (isEven(val))
cout << val <<" iseven. ";
else
cout << val<<" is odd. ";
return 0;
}
// Definition of function isEven *
// This function accepts an integer argument and tests if it is*
// even or odd. The function returns true if the argument is even*
// or false if the argument is odd. The return value is a bool.*
bool isEven(intnumber)
{
if (number % 2 ==0)
return true; // The number iseven if there's no remainder.
else
returnfalse; // Otherwise, thenumber is odd.
}
Explanation / Answer
please rate - thanks #include bool isVowel(char); void header(); int main() {char ch; bool TorF; int count=0; header(); coutRelated Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.