Question: Problem 3 Using a pseudo random number generation function ( e . g . , rand ( ) in C or other equivalent functions in

Problem 3
Using a pseudo random number generation function (e.g., rand() in C or other equivalent functions in other
languages) that generates uniformly distributed random numbers, write three functions that generate the
following: [3 pts each]
(a)100 uniformly distributed integers between 0 and 99
(b)100 uniformly distributed floating numbers between 0.25 and 0.5.
(c)100 numbers in which the number 1 is produced with probability 0.5, the number 2 with probability 0.2,
otherwise a floating number between 3 and 4.
Please submit your code and a sample output. You can use any language as long as it compiles and runs on
our CS servers (e.g.,
zeus.cs.txstate.edu).
Problem 3 Using a pseudo random number generation

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 Programming Questions!