View the step-by-step solution to:

Number Guessing Game Chapter(s) Covered: Chapter 7 Chapter 8 Concepts tested by the program:

Number Guessing Game

 

Chapter(s) Covered:

 

  • Chapter 7
  • Chapter 8

 

Concepts tested by the program:

 

  • Working with arrays
  • Using file operations
  • Using a selection sort to sort an array
  • Using a function to display arrays
  • Using a function to save arrays to file
  • Implementing functions besides function main()


Project Description


Can you legally gamble? Are you 21 years old or older? Do you know Powerball? Don't worry. You are not going to play Powerball but create a simulated game just like that :)! Go find the rule and study it so that you know how to design and code your program accordingly. Go ahead, search the Internet!


Do you see that your program basically just needs to randomly generate 6 numbers for the user to guess and calculate the prize depending on how many numbers are guessed correctly? Develop a C++ program using random number generator, i.e. rand(), function(s), and array(s) for it!



Project Specifications

 

Input for this project:


·       Game mode choice - self_pick or auto_pick

·       Five numbers between 1 and 69 (if game mode is self_pick)

·       One number between 1 and 26 (if game mode is self_pick)


Output for this project:


·       Game title

·       Game rule

·       Game result including

o  Prize

o  Sorted user's numbers

o  Sorted winning numbers

·       Programmer's full name

·       Project number

·       Project due dateFall 18 CMSC 140 Programming Project 5 - Number Guessing Game

 

Chapter(s) Covered:

 

  • Chapter 7
  • Chapter 8

 

Concepts tested by the program:

 

  • Working with arrays
  • Using file operations
  • Using a selection sort to sort an array
  • Using a function to display arrays
  • Using a function to save arrays to file
  • Implementing functions besides function main()


Project Description


Can you legally gamble? Are you 21 years old or older? Do you know Powerball? Don't worry. You are not going to play Powerball but simulated game just like that :)! Go find the rule and study it so that you know how to design and code your program accordingly. Go ahead, search the Internet!


Do you see that your program basically just needs to randomly generate 6 numbers for the user to guess and calculate the prize depending on how many numbers are guessed correctly? Develop a C++ program using random number generator, i.e. rand(), function(s), and array(s) for it!

Recently Asked Questions

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

-

Educational Resources
  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question