CHALLENGE ACTIVITY 301722.2037154.xxxxy7 Jump to level 1 Complete the function CountCharacters() that takes one string p
Posted: Fri Jul 01, 2022 5:51 am
CHALLENGE ACTIVITY 301722.2037154.xxxxy7 Jump to level 1 Complete the function CountCharacters() that takes one string parameter and one character parameter. The function returns the number of characters in the string that are equal to the character parameter. Ex: If the input is zghm z, then the output is: 1 6.11.4: Functions with string parameters. 1 #include <iostream> 2 using namespace std; 3 4 int Count Characters (string inputstring, char x) { 5 y* your code goes here */ 6 01 7 8 } 9 10 int main() { 11 string inputstring; 12 13 14 15 16 17 18 char x; int result; cin >> inputstring; cin >> X; result = CountCharacters (inputstring, x); 2 3 2 3