Update main.c
This commit is contained in:
@@ -1,10 +1,16 @@
|
|||||||
#include "random.h"
|
#include "random.h"
|
||||||
|
#include <stdint.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
set_random_seed(1842);
|
uint32_t seed;
|
||||||
for (int i = 0; i < 10; i++) {
|
printf("Enter seed: ");
|
||||||
|
scanf("%u", &seed);
|
||||||
|
set_random_seed(seed);
|
||||||
|
uint32_t num = random_range(20);
|
||||||
|
for (uint32_t i = 0; i < num; i++) {
|
||||||
printf("%u\n", random_u32());
|
printf("%u\n", random_u32());
|
||||||
}
|
}
|
||||||
|
printf("%u random numbers\n", num);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user