Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

in C++ please. 2 2 Write a C++ program that: (a) uses your studentID as a seed for rand() function. (b) generates a random floating-point

image text in transcribed in C++ please.
2 2 Write a C++ program that: (a) uses your studentID as a seed for rand() function. (b) generates a random floating-point number with 4 decimal points between -10 and -9c.g. -9.5427 and store it a variable. The interval does NOT include -9 and -10 i.e. (-10,-9). (e) print the generated random value. (d) print the absolute value, ceiling and floor of the generated random value. (e) print the decimal part of the generated random value. Sample Output Random number -9.7823 Absolute value: 9.7823 Its floor : -10 Its ceiling: -9 Its decimal part: 7823

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Practical Database Programming With Visual Basic.NET

Authors: Ying Bai

1st Edition

0521712351, 978-0521712354

More Books

Students also viewed these Databases questions