#include #include using namespace std; // Declare constant DIM = 7 // Inserte prototypes here int…

#include

// Declare constant DIM = 7

// Inserte prototypes here

int main()
{
// Declare a two-dimensional array (using the constant) to hold single characters

// Declare variable bsize to hold a whole number

// Declare variable answer to hold a character

// Use a do-loop to allow the user to try again

// Prompt the user “Please enter the size of the board [1-7]: “

// Get the size and store it in bsize

// Check the input stream. If it is invalid, display error message “Invalid entry” and jump out of the loop

// Check if bsize is within the range. If it is, call the functions

// Call the function to create the checkerboard

// Call the function to print the checkerboard

// Call the function to print the rotated checkerboard

// Otherwise, display error message “Invalid size”

// Prompt the user “Do you want to try again [y-n]?: “

// Get the answer and store in answer

// As long as the answer is ‘y’ (in upper or lower case), keep looping


return 0;
}

// Function definitions

// createBoard(): Receives the two-dimensional array and the size of the board (quantity of rows and columns)
// Using nested loops creates the board according to specifications: starting with ‘A’ inserts
// the letters in the array separated by a blank box

// printBoard1(): Receives the two-dimensional array and the size of the board (quantity of rows and columns)
// Using nested loops prints the board

// printBoard2(): Receives the two-dimensional array and the size of the board (quantity of rows and columns)
// Using nested loops prints the board rotated

Lab 19: Two-Dimensional Arrays

In this lab you will practice working with two-dimensional arrays.

Example Program

This program uses nested loops to process a squared two-dimensional array (has the same number of rows as columns) to represent a grid of two-digit numbers. First the array is filled with numbers generated so that their first and second digits correspond to the row and column respectively where the number is in the grid. The array is then passed to a function that displays as many rows and columns as specified by the user.

Your Program

Write a C++ program that creates a checkerboard like the one shown in Figure 1. It then prints the board as is (Figure 1) and rotated like the one shown in Figure 2.
Your program must fulfill the following requirements:
1) You must use a 7×7 (7 rows by 7 columns) 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:

a) Create the array.
b) Allow the user to create as many checkerboards as desired.
c) Prompt the user to enter the size of the board (quantity of rows and columns) that he/she wants to

create. The size must be within the range 1-7.
d) Call the three functions specified below to create and print the board.

5) Function createBoard(): receives the array and the size of the checkerboard specified by the user from main() and returns it filled with the checkerboard.
6) Function printBoard1(): receives the array and the size of the checkerboard specified by the user from main() and prints it as is (see Figure 1).

7) Function printBoard2(): receives the array and the size of the checkerboard specified by the user from main() and prints it rotated (see Figure 2).

Example:

AGM DJP

GHI BHN JKL EKQ

MNO CIO PQR FLR

Figure 1 Figure 2

Note: Here the checkerboards are shown side by side to facilitate the comparison. The actual output will show one on top of the other.
The rows and columns are highlighted just to show they have to be rotated.

Open lab19_FML.cpp in your IDE and implement the algorithm provided in the source code as comments

according to the above specifications.

Tips:

1) You can assign to a char variable the ASCII code of the character that you want to store in it and do arithmetic with it. For example:

char x = 97;
cout << x;
++x;
cout << x;
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.

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).
• See below sample runs showing the behavior of my program for valid and invalid entries. Run my solution and try it with different values to see what your program must do.

Calculate the price
Make an order in advance and get the best price
Pages (550 words)
$0.00
*Price with a welcome 15% discount applied.
Pro tip: If you want to save more money and pay the lowest price, you need to set a more extended deadline.
We know how difficult it is to be a student these days. That's why our prices are one of the most affordable on the market, and there are no hidden fees.

Instead, we offer bonuses, discounts, and free services to make your experience outstanding.
How it works
Receive a 100% original paper that will pass Turnitin from a top essay writing service
step 1
Upload your instructions
Fill out the order form and provide paper details. You can even attach screenshots or add additional instructions later. If something is not clear or missing, the writer will contact you for clarification.
Pro service tips
How to get the most out of your experience with Online Academic Experts
One writer throughout the entire course
If you like the writer, you can hire them again. Just copy & paste their ID on the order form ("Preferred Writer's ID" field). This way, your vocabulary will be uniform, and the writer will be aware of your needs.
The same paper from different writers
You can order essay or any other work from two different writers to choose the best one or give another version to a friend. This can be done through the add-on "Same paper from another writer."
Copy of sources used by the writer
Our college essay writers work with ScienceDirect and other databases. They can send you articles or materials used in PDF or through screenshots. Just tick the "Copy of sources" field on the order form.
Testimonials
See why 20k+ students have chosen us as their sole writing assistance provider
Check out the latest reviews and opinions submitted by real customers worldwide and make an informed decision.
Nursing
thank you so much
Customer 452749, June 10th, 2021
Human Resources Management (HRM)
Very well written and very impressed with this service!
Customer 453077, February 16th, 2022
Sociology
THANK YOUUUUU
Customer 452591, March 18th, 2021
Management
It was gotten well after time I needed to make needed additions, but it is something that did help me. I could not get the concept of ho to start such a project but now reading this, I was over thinking the project it seems.
Customer 452801, July 19th, 2021
English 101
thank you for the excellent work
Customer 452883, October 29th, 2021
Business Studies
Paper is great. Just only needed the one reference. Thank you
Customer 453139, May 4th, 2022
Human Resources Management (HRM)
Always great! My son has been in critical health these last few semesters. Many times I have thought he wasn't going to make it and thought about quitting or postponing school until he was healthier but it always happens to be in the middle of the semester. This service has been a lifesaver for my mindset in helping keep my grades up and keep my son alive at the same time. I don't know if I could have made it through this period without it.
Customer 453077, June 6th, 2022
Other
I am beyond eager to write this review for this writer. I received a grade of "Mastered"upon first submission on this assignment. I will shout to the rooftops ENCOURAGING you to hire him. I have used other writers but NONE have delivered such awesome work as this writer and NONE of their prices can compare to his. He does not try to "break the bank" and he works hard; it shows in the final paper and the grade. He is simply,THE BEST HERE!!
Customer 452995, November 16th, 2021
Business Studies
Amazing!
Customer 452985, November 11th, 2021
Psychology
quick, fast and exact!
Customer 453027, May 24th, 2022
Classic English Literature
It was my first time using such a service. Essay was good and nicely formatted.
Customer 452441, February 16th, 2022
Education
Very fast response and did a excellent job.
Customer 453201, May 31st, 2022
11,595
Customer reviews in total
96%
Current satisfaction rate
3 pages
Average paper length
37%
Customers referred by a friend
OUR GIFT TO YOU
15% OFF your first order
Use a coupon FIRST15 and enjoy expert help with any task at the most affordable price.
Claim my 15% OFF Order in Chat
AllEscortAllEscort
Live ChatWhatsApp
AllEscort