Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This program has to be coded in C++, you can also do the 3 problems easily by using the following source code. int r, //

image text in transcribed

This program has to be coded in C++, you can also do the 3 problems easily by using the following source code.

int r, // row (or line) counter

c; // column counter

// design 1

// for (r=1... takes care of displaying 3 rows

for (r=1; r

{

// one iteration of the body of this loop displays row number r.

// In other words, " when r is 1, row 1 is displayed; // when r is 2, row 2 is displayed; ..."

// for (c=1... takes care of displaying the 5 columns in row

// number r

for (c=1; c

cout

cout

}

Problem 10 (10 points) Modify (save into a different file) your source code file so that it displays on the screen a design similar to design 9, except that the design is only the "outline". For example, if the user wants the size of the design to be 5 and the selected symbol to be'#', the program will display the following design Hint: Look at a typical row, say row 4. What is the composition of this row? Can you detect the "pattern" in each row? Problem 11 (10 points) Modify (save into a different file) your source code file so that it displays on the screen a design similar to design 10, except using a fixed symbol of'' every third row. For example, if the user wants the size of the design to be 5 and the selected symbol to be , the program will display the following design: Hint: You may want to use the "%" operator, and also a named constant const char FIXED SYMBOL

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

Beginning PostgreSQL On The Cloud Simplifying Database As A Service On Cloud Platforms

Authors: Baji Shaik ,Avinash Vallarapu

1st Edition

1484234464, 978-1484234464

More Books

Students also viewed these Databases questions