Question: Write a complete C + + function that does the following: Prompts the user for a positive integer greater than or equal to 3 .

Write a complete C++ function that does the following:
Prompts the user for a positive integer greater than or equal to 3.
Force the user to enter a valid input.
Write a recursive function called changeThrees that does the following:
Modifies the input value by changing any digit equal to 3 to a 2. Prints "removed a 3" every time a 3 is changed to a 2.
Returns the modified number to the calling function.
Your main function should print the number returned by the changeThrees function, then print "I don't like numbers with 3's in them."

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!