Question: c++ Please Complete the main function and write a separate function called function that receives a string and three counters that the function will use

c++ Please

c++ Please Complete the main function and write a separate function called

Complete the main function and write a separate function called function that receives a string and three counters that the function will use to return to main the count of how many lowercase letters (a-z) are in the string, how many spaces are in the string and how many digits 0-9 are in the string. The string should be passed by value and the three integers should be passed by reference in the order stated above. HINT: Letters are in an ordered sequence like digits. So, for instance, 'a' is less than 'e' and 'e' is less than 'z'. Thus, any character not between a-z is not a lowercase letter. Be sure to use single quotes when you compare the character in the string, even when you are comparing the digits. Using a long series of if statements for each character in the alphabet or digit 0-9 will take too much time and will cause you to loose points. Make use of the && in your if statement to test for a range of values. 293816.1501062 LAB ACTIVITY 5.37.1: Lab4Quiz Part II 0/55 main.cpp Load default template... 1 #include 2 #include 3 using namespace std; 4. // include prototype here 5 int main() 6 { string astring; 7 int lettercounter-0,spacecounter-0-0, digitcounter=0; 8 // read a sentence from the keyboard (do not write a prompt to the user) 9 // call the function and pass it the sentence and the three counters 10 11 cout

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!