Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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,

image text in transcribed

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

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

Database Design Application Development And Administration

Authors: Michael V. Mannino

4th Edition

0615231047, 978-0615231044

More Books

Students also viewed these Databases questions