Guessing a secret number assignment

Assignment 8, the Random class
Attached Files:
Random.h (292 B)
Random.cpp (487 B)
(do work in assignments/a08 directory)
Write a C++ program (assignment08.cpp) in which the computer tries to guess a secret number you choose. You should write a Makefile to build your application. Random.cpp and Random.h are provided (attached to this assignment).
The program should:
Ask you for a secret number between 1 and 100. Use cout to ask the question and cin to read the number you type into an int variable
Create a Random variable named "oracle" that generates random numbers between 1 and 100
Inside of a while() loop, get a random number from the oracle. The loop should end when oracle guesses the number you have chosen.
After the loop, print out the number of tries the oracle required to guess your secret number.
Create a gzipped tarball of your program and Makefile (do not include Random.cpp or Random.h):
tar czvf assignment08.tar.gz assignment08.cpp Makefile

Any help on how to do this project?
1. Read the question.
2. Make a list of things you need to do to solve the question. (break down the question)
3. Attempt the question by doing the things on your list.
4. Make note of the things that you had trouble with, especially if your program did not work.
5. Try to solve the problem yourself/look it up on google (This may include rewriting your program)
6. Post back here with code that you've written, and a concrete list of the problems you are having.
Topic archived. No new replies allowed.