Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a program that reads a string from the keyboard and then display all vowel

ID: 3642792 • Letter: W

Question

Write a program that reads a string from the keyboard and then display all vowels contained within a user-input string. (Vowels are: a e i o u)

Write a program that prompts the user to enter 15 double numbers from the keyboard and save them into a 3 by 5 array in the main ( ). Then call a user-define function to compute the average of each row and print the original matrix and average of each row in this function. (25 points)

Note: Maximum points will be given for using pointer notation in user-defined function


Need help in these two as i am not used to doing C++ programs !!
Appreciate your responses.

Explanation / Answer

#include<iostream>

#include<string>

using namespace std;

int main()
{

string str;

cout << " enter a string";

cin >> str;

for(int i=0; i<str.length(); i++)

{

switch(str[i])

{

case 'a':

case 'A': cout << "a " << endl; break;

case 'e':

case 'E': cout << "e " << endl; break;

case 'i':

case 'I': cout << "i " << endl; break;

case 'o':

case 'O': cout << "O " << endl; break;

case 'u':

case 'U': cout << "u " << endl; break;

}

}

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote