Question: Write a C + + function named printMessage that takes two arguments: a string message and an int times. The times argument should have a

Write a C++ function named printMessage that takes two arguments: a string message and an int times. The times argument should have a default value of 1. The function should print the message the specified number of times. Then, write a main function that calls printMessage twice: once with just the message and once with the message and the times specified. Receive both values as user input.

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 Programming Questions!