generates random numbers

computer science

Description

You will write a program that generates random numbers between a minimum and maximum using a seed provided by the user. For this part, you must: 1. You will need to ask the user to input three values that will form your seed by using the following formula: seed = s1 + s2 * s3. 2. Use the calculated seed to seed your random number generator once and only once inside of int main prior to generating any random number. (Do not reseed your random number generator for any phase of this lab). 3. Write a function called getRandomNumber that takes two integers (min and max). It will generate a random number, narrow it between min and max [inclusively], and return the result. This function MUST have a prototype above int main() and a definition below int main(). 4. Ask the user for a minimum and maximum. If the user makes the maximum lower than the minimum, you must swap them. 5. Finally, output the random number your function calculated. 6. NOTE: There are different random number generators per operating system, you may NOT get the same values we do in the sample interaction


Related Questions in computer science category


Disclaimer
The ready solutions purchased from Library are already used solutions. Please do not submit them directly as it may lead to plagiarism. Once paid, the solution file download link will be sent to your provided email. Please either use them for learning purpose or re-write them in your own language. In case if you haven't get the email, do let us know via chat support.