Question
Exercise 4: Rewrite your C++ solution to Exercise 3 so that the symbol used as the border is also read as data and passed to
Exercise 4: Rewrite your C++ solution to Exercise 3 so that the symbol used as the border is also read as data and passed to function Print as a parameter. To make the symbol be a parameter requires the following changes:
Prompt for and read the symbol.
Add the symbol and its type (or just the type) to the parameter list of the function prototype.
Add the symbol and its type to the parameter list of the function definition. Use the parameter instead of $ in the body of the function definition.
Add the symbol to the argument list. Run the program three times using &, %, and A as symbols and 4, 10, and 7 as the number of symbols to use.
This is what I have so far:
#include
while(numSigns>=0) { print(numSigns); cout<<"Enter the number of dollar signs for the top;"; cout<<"press return."; cout<<"Enter a negative number to quit."<
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