Question: In C++ please White a program whose input is a character and a string. and whose output indicates the number of times the character appeass

In C++ please
In C++ please White a program whose input is a character and

White a program whose input is a character and a string. and whose output indicates the number of times the character appeass in the string Ex lf the input is n Monday, the output is: Ex If the input is: z Today is Monday, the output is: Ex if the input is n. It's s sunny day, the output is: Cage matters. n is different than N. Ex if the input is n Nobody, the oulput is Your program must define and call the following function that returns the number of times the input character appears in the input sfring int countcharacters (char userchar, string userstring) Some string functions that will be helpful - string, size() retums the number of characters in the string. Exit the string s s "Test', then s. size() is 4 - string.at(pos) tetums the character at position pos. Ex If the string s n "test; then s. at (e) is T, and s.at (1) is e

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!