generates random numbers
University of Cumberland Baghdad Bank Physical Security Failed Discussion
January 22, 2019
Discussion Question 1 week 5
January 22, 2019

generates random numbers

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

 

Looking for a Similar Assignment? Order now and Get 20% Discount!
Use Code; GET20

WhatsApp Chat with us on Whatsapp