#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);
}