Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

#include <iostream> using namespace std; const int MAX =8; //These functions exp

ID: 3619033 • Letter: #

Question

#include <iostream>

using namespace std;

const int MAX =8;

//These functions explained below

void spaces();

void introduction();

void a(intnumber[]);

int main()

{

char response;

int number[MAX];

for (inti = 0; i <= MAX; i++)

{

number[i] = i + 1;

}

for(intdisplay = 0; display <= MAX;display++)

{

cout << number[display];

if((number[display] % 3) ==0)

{

cout << endl;

}

}

do

{

a(number);

cout << endl << endl;

//Asks the user he would like to go again anything other than (Y ory) the program ends

cout << "Would you like to go again (Yor y): ";

cin >> response;

cout << endl;

}while(response == 'Y' || response== 'y');

return 0;

}

//This void function is for 2 statement spaces betweensentences

void spaces()

{

cout << endl << endl;

}

//This void function explains what the program is about toperform

void introduction()

{

cout << " ";

spaces();

}

void a(intnumber[])

{

int u,i,count=9;

do

{

cout << "User 1 what is your choice.";

cin >> u;

u = 'X';

number[u] = u;

cout << number[u];

count --;

cout << "User 2:";

cin >> i;

number[i] = toupper(i);

cout << number[i];

for(intdisplay = 0; display <= MAX;display++)

{

if(number[i]=='O')

cout << 'O';

if((number[display] % 3) ==0)

{

cout << endl;

}

}

count--;

}while (count != 0);

}

Explanation / Answer

please rate - thanks here is your hint I've messaged you these, and only these changes MAX should be 9 , it then has indices 0-8 u is an integer, it can't have the value 'X'. look at asciitable.com - use ascii values to allow numbersand integers make number a char array so that it can hold numbers such as'1','2','3','4'...and letters 'X','O' cout > u; u ='X';                          //remove number[u] =u;                    //number[u-1]='X' and make number a char cout