1. Write a C++ program that implements a simple TV/movie trivia game. The progra
ID: 3935469 • Letter: 1
Question
1. Write a C++ program that implements a simple TV/movie trivia game. The program begins by welcoming the prospective player to the game, then asks the player if s/he is ready to play. If the player responds “N” or “n” for “no,” the program displays an appropriate message and ends. If the player responds “Y” or “y” for “yes,” the program displays a question and prompts the player to enter an answer. If the player responds correctly, the program displays “You are correct!” (or something similar). If the player responds incorrectly, the program responds “Nice try, but no.” (or something similar). The program then asks the player if s/he wants to play again. If the player responds in the affirmative (“Y” or “y”), the program displays another question; otherwise, it thanks the player for playing and ends. The program must continue to loop until the player decides to quit playing. As usual, your program output should resemble the sample runs at the end of this document.I've attached sample runs.
Explanation / Answer
#include "stdafx.h" #include "question.h" #include #include #include using namespace std; void questionAns(question[], int); int main() {//start main question trivia[10]; //10 instances of Game class int count = 0; //used to count through loop and as index //variables to hold players answers int onechoice; int twochoice; //holds total points for each player int int twoPoints = 0; int x; coutRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.