Skip to content

Instantly share code, notes, and snippets.

@ymhuang0808
Last active August 29, 2015 14:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ymhuang0808/11403174 to your computer and use it in GitHub Desktop.
Save ymhuang0808/11403174 to your computer and use it in GitHub Desktop.
#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