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

 This program has to be coded in C++, you can also

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!