Question: EXERCISE ( O ) : Custom Cake In this activity you will create a program called The program will first ask for the number of

EXERCISE (O):
Custom Cake
In this activity you will create a program called
The program will first ask for the number of layers (rows) of a cake. It will then scan in an ASCII character for each layer. Finally, the program will print out a row for each layer (ASCII character), equal in width to the number of layers.
For example, if the number of layers was 3, it should print out a cake that is characters large. If the number of layers was 5, it should print out a cake that is 55 characters large.
HINT:
To ensure correct input handling, you might want to include a space before the %c specifier in the scanf function for reading characters to help clear any preceding whitespace characters or newline characters left in the input buffer from previous inputs.
Examples
 EXERCISE (O): Custom Cake In this activity you will create a

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