Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In C++ please! Given an input line of text and two individual characters, count how many times the first character appears in the text and
In C++ please!
Given an input line of text and two individual characters, count how many times the first character appears in the text and replace each instance of the first character with the second character. The output should be the number of occurrences of the first character (first line), and the new text (second line). If the first character is not found then the text should not change.
sample input:
Harding University i
sample output:
3 HardIng UnIversIty
sample input:
I don't know what I don't know. '
sample output:
2
sample input:
scud spud stud a
sample output:
0Chap9Lab3.cpp Load default 1 /* Given input text on the first line, and a character on the second line count how many times the characters appears in the line. */ 3 4 #include
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started