Question: need help completing this code! please help! 5.5 Lab 30: Square of Characters Write a program to build a square of characters. The character making

need help completing this code! please help!

need help completing this code! please help! 5.5 Lab 30: Square of

Characters Write a program to build a square of characters. The character

5.5 Lab 30: Square of Characters Write a program to build a square of characters. The character making up the square and the size of the square is to be determined by the input. Use a FOR loop to build your square. For example, if % and 5 are input, then your program should build a square of % characters that consists of 5 rows and 5 columns Hints 1. Use a char datatype for the variable that holds the character. You can then use the variable as an argument to setfilio 2. Use an int datatype for the variable that holds the size of your square. You can then use the variable as an argument for setw() 3. Each iteration of your FOR loop will output a row of characters. When the input is as shown in Figure 1, your program should produce the output as shown in Figure 2. Figure 1: (input) Figure 2 (output) @@@@@@@ @@@@@@ @@@@@@@ era a cele @ @ @ @ @ @ @ @@@@@@ 1 / Ryan Dewey 2 V/ CS 1336. DMI 37 Lab 3e 4 5 #include 6 using namespace std; 7 int main() 8 { 9 char symbol; 10 int numRows: 12 I read in the charcater and the value that will determine the loop 13 cin.get(symbol); 14 cin >> numRows: 15 16 Hwrite a loop that will repeat numRows times 17 for() 18

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!