Question: need help //****************************************************************** // Chessboard program // This program prints a chessboard pattern that is built up from // basic strings of white and black

need help

//****************************************************************** // Chessboard program // This program prints a chessboard pattern that is built up from // basic strings of white and black characters. //******************************************************************

#include #include

using namespace std;

const string BLACK = "$$$$$$$$"; // Define a line of a black square const string WHITE = " "; // Define a line of a white square

int main () { string whiteRow; // A row beginning with a white square string blackRow; // A row beginning with a black square // Create a white-black row by concatenating the basic strings whiteRow = WHITE + BLACK + WHITE + BLACK + WHITE + BLACK + WHITE + BLACK; // Create a black-white row by concatenating the basic strings blackRow = BLACK + WHITE + BLACK + WHITE + BLACK + WHITE + BLACK + WHITE; // Print five white-black rows cout

 need help //****************************************************************** // Chessboard program // This program prints a

025903_CH02 DaleLab 18 20 Exercise 3: Change the program so that only the outline of each square is shown. Here is an example row: ss$ss$$$ SS$$$S$$ SSS$SSS$ s$$SS$$S $$$SS$$ S$$SS$$ SSS$SS$ Compile and run your program. Exercise 4: Change the program from Exercise 3 so that the squares are 8 by 8 rather than 5 by 8. Here is an example row: $$$S$$ Compile and run your program. Clearly an 8-by-8 design is not a square but a 5-by-B design is. Explain

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!