Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a C++ program that creates a 6x6 checkerboard like the one shown in Figure 1 but then prints it rotated 90 degrees like the

Write a C++ program that creates a 6x6 checkerboard like the one shown in Figure 1 but then prints it rotated 90 degrees like the one shown in Figure 2. Your program must fulfill the following requirements: 1) You must use a two-dimensional char array to implement the board. 2) You must use a global constant variable (named constant) to specify the dimensions (rows and columns) of the array. 3) You must use nested loops to solve the problem. 4) Function main() must create the array and then call the three functions specified below: A) createBoard(): receives the array from main() and returns it filled with the checkerboard. B) printBoard1(): receives the array from main() and prints it as is (see Figure 1). C) printBoard2(): receives the array from main() and prints it rotated 90 degrees (see Figure 2). Hints: 1) Remember that you can assign to a char variable a whole number corresponding to the ASCII code of the character that you want to store in it. 2) Once you figured out how to create the checkerboard, printing it as in Figure 1 is pretty straight forward. To print it like in Figure 2 you need to make minor changes. Example: A B C A G M D E F D J P G H I B H N J K L E K Q M N O C I O P Q R F L R Figure 1 Figure 2 Important: ? You must choose the most appropriate data types for your variables, parameters, and functions. ? When you pass an array to a function make sure you pass it in the most appropriate way (const or not const). image text in transcribed THIS IS WHAT THE OUTPUT SHOULD LOOK LIKE!!

A B C D E F G H I M N O P QR A GM D JP B HN C I O F LR Press any key to continue . . . ._

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

Fundamentals Of Database Management Systems

Authors: Mark L. Gillenson

3rd Edition

978-1119907466

Students also viewed these Databases questions