-
-
Save willk/893fab0b9818cdd05079 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <time.h> | |
int main(void) | |
{ | |
srand(time(0)); //use current time as seed for random generator | |
int random_variable = rand(); | |
printf("Random value on [0,%d]: %d\n", RAND_MAX, random_variable); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment