Skip to content

Instantly share code, notes, and snippets.

@pwnwriter
Last active May 23, 2022 13:50
Show Gist options
  • Save pwnwriter/51ea003b0f31806265dc219e479775ae to your computer and use it in GitHub Desktop.
Save pwnwriter/51ea003b0f31806265dc219e479775ae to your computer and use it in GitHub Desktop.
Generate Random number in c !
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int main(int argc, char* argv){
time_t random=time(NULL);
srand(random);
printf("%d\n", rand());
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment