Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed 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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

3. What is ethnocentric bias?

Answered: 1 week ago