Question: hello need help on this 3. Implement the following function within a program named lab2_3.cp // Return true if the string cat and dog appear
hello need help on this

3. Implement the following function within a program named lab2_3.cp // Return true if the string "cat" and "dog" appear the same // number of times in the given string. 1/ catDog("catdogdogcat") + true Il catDog("dogdogcat") false Jl catDog("hartnelldogandacat") true bool catDog (string str); Create a driver (a main file) which asks the user for a string, and then prir Example: Enter a string: catdog Cat and dog appear the same number of times in catdog. Example: Enter a string: catcat Cat and dog do not appear the same number of times in catcat. Example: Enter a string: 1caticadodog Cat and dog appear the same number of times in 1caticadodog
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
