WRITE IN C You are required to create a game that will operate as follows: A pla
ID: 3617075 • Letter: W
Question
WRITE IN CYou are required to create a game that will operate as follows:
A player will guess a three letter word. You are required to ensurethat the word entered has only three characters,otherwise allow theuser to try again. You are required to create an array of stringsize 10 with three letter words which will be displayed to the userat the beginning of the game from which the player will select aword.
The word selected by the player and the one selected by thecomputer will be compared and the scoring should be kept,allow theuser to enter the number of times they desire to run the program.At the end of the game display the computer's score and theplayer's score and a congratulations message to the overallwinner.
Explanation / Answer
please rate - thanks #include #include #include #include #include int main() {int personScore=0,computerScore=0,len,i,j,howmany; char computer[4],person[4]; srand(time(0)); charchoices[10][4]={"hat","sox","dad","mom","cat","dog","ham","mat","sat","lot"}; printf("How many games do you want to play? "); scanf("%d",&howmany); for(j=0;jpersonScore) printf("computer won!!! "); if(computerScore==personScore) printf("TIE game! "); getch(); return 0; }Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.