Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Can you edit my C++ code? (In the below) Hello, I am making a game that has 2 players. Each player replace 4x7 columns of
Can you edit my C++ code? (In the below)
Hello, I am making a game that has 2 players. Each player replace 4x7 columns of 0's with either 1 or 2 respectively. I believe there is a problem with my code, because there are 4 columns and 7 rows, but if I enter numbers bigger than these, it still accepts. Can you please fix that. Also I want you to print the final version of that 4x7 board after each player makes their move, so the next player can understand which positions are filled.
I am giving you an example image:
The code I made:
#includeusing namespace std; // function to print the board void printarray(int arr[][4]){ for (int i = 0; i Oyuncul dizi seciniz (0-3): 3 Oyuncul konum seciniz (0-6): 3 Oyuncul yerlestirilecek elemani seciniz (1-2):1 | 00 00 1 2 101 0 1 101 LOT 101 1001 1 1 1 101 | 2010 01 1 21 1 1 1 10 11 I TOI2 2 | ***************** 0 1 2 3
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started