Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

c++ launguage please help The game Pico Fermi Bagel is a number guessing game. The computer picks a secret number: the secret number must be

c++ launguage please help

The game Pico Fermi Bagel is a number guessing game. The computer picks a secret number: the secret number must be 3 digits, none of the digits can be the same, and it cannot start with a zero. 104 is OK, but 091 and 212 are not. The user tries to guess the secret number - if none of the digits in the user's number are in the secret number, then the program replies with BAGEL (or B). For each digit in the user's number that is in the secret number but not in the right place value, the program replies PICO (or P). For each digit in the user's number that is in the secret number and is in the right place, the program replies FERMI (or F). When the user has Fermi Fermi Fermi (FFF) the secret number has been found.

In a file, write the secret number, then write the user guess and its result (e.g. 123 B, 456 FF, 789 P, 846 FFF). When the user wins, write the number of guesses it took. Allow the user to quit the program and allow the user to play again. If the user quits, display the secret number.

After your project is complete, you will be assessed on the following:

  • Generating random numbers
  • Use of the modulus
  • Text file operations : writing a file
  • Conditionals : if, if-else, switch
  • Loops : while, do-while, for

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

Icdt 88 2nd International Conference On Database Theory Bruges Belgium August 31 September 2 1988 Proceedings Lncs 326

Authors: Marc Gyssens ,Jan Paredaens ,Dirk Van Gucht

1st Edition

3540501711, 978-3540501718

More Books

Students also viewed these Databases questions