Question: To help you understand how to write basic programs using functions, Please write a 'C' program that will have the following features: 1. The overall
To help you understand how to write basic programs using functions, Please write a 'C' program that will have the following features:
1. The overall function of this program will be to produce 5 random numbers within the range of 1 (include 1) up to a value specified by the user.
2. You Must use an input function to get the upper limit and return it to the main function with the return statement. Put some error checking in the input function to make sure the upper limit the user enters is greater than 1 but less than 100.
3. Write a second function that is called from the main function, and pass it the number 1 and the upper limit that the user specified. Draw a random number between those two numbers and return it to main.
4. Write a third function that is called from main that will take the random number and output it to the screen with a printf statement.
5. Put a 'for' loop around the 3 calls in main and loop 5 times.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
