For the second assignment you will develop a simple program that requires a makefile.
The program is a number guessing game where the user is asked to enter an integer number within a range, and the program will tell the user if it is too high, too low, or the correct guess.
Minimum Requirements
- The program is a console program and may be written in C or C++.
- All related functions should be in separate source files.
- Game functions:
- Create random number
- Determine if guess is too high (return 1), too low (return -1) or correct (return 0)
- User interface functions:
- Ask the user for a guess and validate it is an integer
- Tell the user the result of the guess
- No global variables are permitted
- The upper limit of the guessing range must be specified by a #define statement
- Use a makefile early in the process but you must use macros extensively.
- Create a second makefile with appropriate macro definitions to compile the solution on a Linux system (Ubuntu preferred).
Please submit your completed assignment to the D2L dropbox in a zipped folder. Include only the source files and the 2 makefiles.
Note: Do not submit a Visual Studio solution. The purpose of this exercise is explicitly to avoid the use of Visual Studio.
Reviews
There are no reviews yet.