Question: Write a C++ program that generates a random floating-point number with 5 decimal points between -17 and -16 e.g. -16.57412 and stores it in a

Write a C++ program that generates a random floating-point number with 5 decimal points between -17 and -16 e.g. -16.57412 and stores it in a variable. The interval does NOT include -17 and -16 i.e. (-17,-16). (a) use your studentID as a seed for rand() function. (b) print the generated random value. (c) print the absolute value, ceiling and floor of the generated random value. (d) print the decimal part of the generated random value. 2 Sample Output Random number : -16.57412 Absolute value: 16.57412 Its floor : -17.00 Its ceiling: -16.00 Its decimal part: 57412
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
