Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use C++ and Visual Studio Write a program in a cpp file called countVowels_LastNameFistName.cpp that reads input from a text file (sentence.txt) and outputs the

image text in transcribed

Use C++ and Visual Studio

Write a program in a cpp file called countVowels_LastNameFistName.cpp that reads input from a text file (sentence.txt) and outputs the number of times each lowercase vowel appears in the sentence to both the screen and output_LastNameFirstName.txt. Your program must contain the function below countVowels that return the number of times each lowercase vowel appears in the sentence. void countVowels(string str, int& aCt, int& eCt, int& iCt, int& oCt, int& uCt), (Notice the return (void) and it should be the same. Also, no print statements in this function) (Hint: that if str is a variable of type string, then str.at(i) returns the character at the ith position. The position of the first character is 0. Also, str.length) returns the length of the str, that is, the number of characters in str.) Enter a string: Hello. This is COSC 1437 The number of a's: 0 he nunber of e's: 1 The number of i's: 2 The number of o's 1 The number of u' s: 0 Press any key to continue

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Databases Technologies And Applications

Authors: Zongmin Ma

1st Edition

1599041219, 978-1599041216

More Books

Students also viewed these Databases questions

Question

What is the difference between Needs and GAP Analyses?

Answered: 1 week ago

Question

What are ERP suites? Are HCMSs part of ERPs?

Answered: 1 week ago