Skip to content

Instantly share code, notes, and snippets.

@ymhuang0808

ymhuang0808/random_test.c

Last active Aug 29, 2015
Embed
What would you like to do?
#include<stdio.h>
#include<stdlib.h>
#include<time.h>
int main() {
int r;
int i;
for (i = 0 ; i < 11 ; i++) {
srand(time(NULL)+i);
r = rand();
printf("r = %d, *r = %d\n", r, r % 10 + 5);
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.