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 5 (10 points) Modify (save into a different file) your source code file so that it displays on the screen a design similar to design 4, except that the design is filled with stars instead of numbers. For example, if the user wants the number of rows to be 3 and the number of columns to be 7, the program will display the following design Problem 6 (10 points Modify (save into the same file as problem 5) your source code file so that it displays on the screena design similar to design 5, except that the design is filled with symbol selected by the user instead of always a star. For example, if the user wants the number of rows to be 3, the number of columns to be 7, and the selected symbol to be '@', the program will display the following design Problem 7 (10 points) Modify (save into a different file) your source code file so that it displays on the screen a design similar to design 6, except that the design is a "right triangle" instead of a "rectangle", with the "base" equal to the "height". 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 Validate the value of size read from the user to be between 1 and 20, inclusive

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!