Question: Write a line of code that perform the following tasks: a. Create a random object called generator b. Declare a variable intgen of type int

Write a line of code that perform the following tasks:

a. Create a random object called generator

b. Declare a variable intgen of type int and a variable floatgen of type double

c. Generate random integers between -30 and 30 (both inclusive) and stores that in intgen

d. Generate random floating point values betwen 3 (inclusive) and 7 (exclusive) and stores that in floatgen

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!