Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

random number in c

#include <stdio.h>
#include <stdlib.h>
#include <time.h>

    #define randnum(min, max) 
        ((rand() % (int)(((max) + 1) - (min))) + (min))

int main()
{
    srand(time(NULL));

    printf("%d
", randnum(1, 70));
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #random #number
ADD COMMENT
Topic
Name
2+4 =