Write a program that prompts the user to enter a string. The program then uses the function substr to remove all the vowels from the string. For example, if str = "There", then after removing all the vowels, str = "Thr". After removing all the vowels, output the string. Your program must contain a function to remove all the vowels and a function to determine whether a character is a vowel. this is what is have: #include #include using namespace std; string substr(string word); bool vowel(char ch); int main() { string word; string newWord; cout << "Enter a word: "; cin >> word; newWord = substr(word); cout << "Your new word is: " << newWord << endl; return 0;
Write a program that prompts the user to enter a string. The program then uses the function substr to remove all the vowels from the string. For example, if str = "There", then after removing all the vowels, str = "Thr". After removing all the vowels, output the string. Your program must contain a function to remove all the vowels and a function to determine whether a character is a vowel.
this is what is have:
#include <iostream>
#include <string>
using namespace std;
string substr(string word);
bool vowel(char ch);
int main()
{
string word;
string newWord;
cout << "Enter a word: ";
cin >> word;
newWord = substr(word);
cout << "Your new word is: " << newWord << endl;
return 0;
}
string substr(string word)
{
}
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images