Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a C++ program named project1.cpp that implements a version of the High Number Low Number game. Initially, the program asks a user to create

image text in transcribed

Write a C++ program named project1.cpp that implements a version of the High Number Low Number game. Initially, the program asks a user to create an account. This requires a user's name (single name), a password, and a previous high score. The high score must be a positive number. Give the user two tries to enter their previous high school correctly, if they don't the game ends. If the account is successfully created, the user is able to continue playing the game by typing in their password. If the user entered the correct password, your program should display a menu for the High Card Low Card game. Otherwise, the machine should display a warning message and give them one more chance to enter the correct password. (Note do NOT use multiple return 0 or exit statements to end the program early, you have to use if..else statements). If the user enters an incorrect password again, your program should display an error message and finish the game. If the user entered the correct PIN, your program should provide three options as below: 1. Play a round 2. Current stats 3. End Game At this point, the game should continue to run until the user selects the exit option. If the user selected an invalid option number, your program should display a warning message. The way the play a round option works is a random number between 1 and 10 is generated. The user is asked if the next random number will be higher or lower. If the user correctly guesses whether the next number is higher or lower, they are awarded a point. If they guess incorrectly, their score is reset to zero. They can continue to play more rounds and their score will add up until the guess incorrectly. Note your code will make sure the two random numbers generated are never equal

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Filing And Computer Database Projects

Authors: Jeffrey Stewart

2nd Edition

007822781X, 9780078227813

More Books

Students also viewed these Databases questions

Question

What are Measures in OLAP Cubes?

Answered: 1 week ago

Question

How do OLAP Databases provide for Drilling Down into data?

Answered: 1 week ago

Question

How are OLAP Cubes different from Production Relational Databases?

Answered: 1 week ago