Write a program whose input is a character and a string, and whose output indicates the number of times the character appears in the string. If the input is: n Monday, the output is 1. If the input is: z Today is Monday, the output is 0. If the input is: n It's a sunny day, the output is 2.
Case matters. If the input is: n Nobody, the output is 0. (n is different than N). Your program must define and call a function int CountCharacters(char userChar, string userString). The function should return the number of times the input character appears in the input string.
Recently Asked Questions
- The cost of petrol rises by 2 cents a liter. last week a man bought 20 liters at the old price. This week he bought 10 liters at the new price. Altogether,
- Under _____, payments are based on a measure of organization performance and the payments do not become part of the base salary. A. fixed pay systems B. merit
- For what chemical reason should you separate remaining zinc from iodine solution before adding bleach to the solution? (Background: zinc dust was placed in