Question: Test your random number generator. Draw a flowchart and write a C function that will test your random number generator. Compare it against rand() function

Test your random number generator. Draw a flowchart and write a C function that will test your random number generator. Compare it against rand() function from standard C library. For this, generate a lot of random numbers (>100k), keep each number's count, and print the normalized results at the end in tab separated order. You should have main.c, test_random.c, test_random.h, myrand.c and myrand.h files. Problem 1 (10 pts). Pseudo-random number generator. Draw a flowchart for a pseudo-random number generator, then write its C function. The generated random number should be between [1, 15]. It should be a pure C function without any external function calls. (i.e rand()) Explain your method. You should have main.c, myrand.c and myrand.h files. myrand.c should have your random number generator function definition. myrand.h should have a function declaration. main.c should include your myrand function and call it.

Ask an expert

Draw a flowchart for a pseudo-random number generator, then write its C function. The generated random number should be between [1, 15]. It should be a pure C function without any external function calls. (i.e rand()) Explain your method. You should have main.c, myrand.c and myrand.h files. myrand.c should have your random number generator function definition. myrand.h should have a function declaration. main.c should include your myrand function and call it.

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!