This is a very simple C programming task that only utilizes basic knowledge of t
ID: 662234 • Letter: T
Question
This is a very simple C programming task that only utilizes basic knowledge of the C language. It is a random number generator! I will provide the code that I have written so far. Here is the description of the task:
There are also simple templates for how the program should be coded.
A Roll of the Dice
Description
I am trying to write two programs: enee140_gen_rnd.c and enee140_test_rnd.c. The first program will generate pseudo-random numbers, with several ranges and distributions, and the second program will test the randomness of the numbers you have generated. You will have to implement several C functions in order to provide the functionality of the random number generator (RNG). This program will print out a menu of options, prompt the user to choose an option from the menu and then invoke the corresponding function.
A sequence of numbers generated by a deterministic computer program is not truly random, unlike a sequence of coin tosses or repeated rolls of a pair of dice. Instead, the sequence appears to be random, by providing properties (e.g. uniformity) that are adequate for a variety of applications that require random numbers (e.g. simulation, cryptography, gaming). Such numbers are formally calledpseudo-random numbers; in this handout, we simply call them random numbers, to avoid complicating the description.
The core of most random number generation programs is a function, such as rand() from the C standard library, that generates integer numbers uniformly distributed between 0 and a value RND_MAX. Other ranges and distributions can be obtained by transforming numbers generated in this manner. The random number generators must be initialized by calling a function to provide a seed
Explanation / Answer
just remove some parts of your code else rest is working just fine,
1)first unnecessary main function is to be removed.
2) unnecessary include also has to be removed.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.