Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //MC for programmers
- //Given parameter N, return the desired exponential distribution for M samples
- #include <stdio.h>
- #include <stdlib.h>
- #include <time.h>
- #include <math.h> // for the log function, compile with -lm
- //Compile with: gcc -o challenge02 challenge02.c -lm
- //Execute with: ./challenge02 20 10 (Generate 10 samples from the exponential for parameter equal to 20
- //prototypes
- extern float exponential(float);
- void showN_exponential(float, int);
Advertisement
Add Comment
Please, Sign In to add comment