Texas A&M University CS Data Structures Project

I need help if my code is right and how to runGame() that calls the functiongetLetter() and takes the user guess to run the game.

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

/**

Filename: GuessMyLetter.cpp

Author:

Date last modified: 9/9/2021

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

This program simulates the computer guessing game.

*/

#include

#include “time.h”

using namespace std;

void getLetter(char aplh[],int n)

{

char alph[27] =

{

‘0’, ‘A’, ‘B’, ‘C’, ‘D’, ‘E’, ‘F’, ‘G’, ‘H’, ‘I’, ‘J’, ‘K’, ‘L’, ‘M’, ‘N’, ‘O’, ‘P’, ‘Q’, ‘S’, ‘T’, ‘U’, ‘V’, ‘W’, ‘X’, ‘Y’, ‘Z’

}

;

int V = 21;

}

int getPosition()

{

int position = 1 + (rand() % 26);

return position;

cout << "I am thinking of a letter. What is your letter? ";

while(true);

{

int guess;

cin >> guess;

if (guess == position)

{

cout << "Congratulations you guessed my letter." << endl;

} else if (guess < position)

{

cout << "Your guess is too low" << endl;

}

else (guess > position);

{

cout << "Your guess is too high" << endl;

}

}

}

void runGame() {

}

int main(void)

{

cout << RAND_MAX << endl;

srand((unsigned)time(NULL));

int RND;

cout << rand() << endl;

for (int i = 0; i < 11; i++)

{

RND = getPosition();

cout << RND << "\t";

}

/*end for*/

system(“pause”);

return 0;

} /**
Filename: GuessMyLetter.cpp
Author:
Date last modified: 9/9/2021
This program simulates the computer guessing game.
*/
#include
#include “time.h”
using namespace std;
void getLetter(char aplh[],int n)
{
char alph[27] = { ‘0’, ‘A’, ‘B’, ‘C’, ‘D’, ‘E’, ‘F’, ‘G’, ‘H’, ‘I’, ‘J’, ‘K’, ‘L’, ‘M’, ‘N’, ‘O’, ‘P’, ‘Q’, ‘S’, ‘T’, ‘U’, ‘V’, ‘W’, ‘X’, ‘Y’, ‘Z’};
int V = 21;
}
int getPosition() {
int position = 1 + (rand() % 26);
return position;
cout > guess;
if (guess == position)
{
cout

Still stressed from student homework?
Get quality assistance from academic writers!

Order your essay today and save 25% with the discount code LAVENDER