Answered step by step
Verified Expert Solution
Question
1 Approved Answer
question 1,2,3 LAB 4: Give Me a Smile! 1. Draw A square: Write a c++ program that prompts the user to enter the width (number
question 1,2,3 LAB 4: Give Me a Smile! 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 wi to be an odd number. Save as drawsquare. cpp dth 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.cpp Example: width 11 would produce .v 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 drawmoresmiles.cpp. Upload the .cpp files and widths.txt to Lab 2 on Blackboard
question 1,2,3
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