Question: 1. Draw A Square: Write a C++ program that prompts the user to enter the width (number of characters wide) of a text art canvas,

1. Draw A Square: Write a C++ program that prompts the user to enter the width (number of characters wide) of a text art canvas, then produces a width by width sized outline of a square of asterisks The program should use input validation to only allow the width to be an odd number. Save as drawsquare.cpp Example width-5 would produce 2. Draw A Smiling Blockhead: Write a C++ program that enhances the Draw A Square program to add two eyes, a nose and a smile proportionally adjusted to the size of the blockhead. Save as drawsmile.c PP Example: width-11 would produce 3. Draw More Smiles: Create a text file called widths.txt containing 5 different values for widths separated by spaces Include one that is an even number. Then modify the Smiling Blockhead program to repeatedly read a width from widths.txt and produce a smiling blockhead for each width read. Save as
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
