Home / Expert Answers / Computer Science / c-4-17-lab-count-characters-write-a-program-whose-input-is-a-character-and-a-string-and-whose-ou-pa800

(Solved): C++ 4.17 LAB: Count characters Write a program whose input is a character and a string, and whose ou ...



C++

4.17 LAB: Count characters
Write a program whose input is a character and a string, and whose output indicates the number of
4.17 LAB: Count characters 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 The output should include the input character and use the plural form, n's, if the number of times the characters appears is not exactly 1 Ex: If the input is n Monday. the output is 1 n Ex: If the input is Today is Monday the output is 0 z'o Ex If the input is n It's a sunny day) the output is 2 n's Case matters Ex: If the input is n Nobody the output is 0 n'a


We have an Answer from Expert

View Expert Answer

Expert Answer


#include using namespace std; int main() { int count=0; char ch, str[100]; // variab
We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe