Answers for "one random number in c with range 01 to 6"

C
10

how to create random integers from a specific range in c language

//How to create random integers within a specific range in C langauge. 

srand(time(0))
number = (rand() % (upper - lower + 1)) + lower
//upper = max number
//lower = least number
Posted by: Guest on July-21-2020
0

how to generate random between 0 and 9 in c

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

int main()

{
    int randomnumber;
    srand(time(NULL));
    randomnumber = rand() % 10;
    printf("%dn", randomnumber);
    return 0;
}
Posted by: Guest on May-17-2020

Code answers related to "one random number in c with range 01 to 6"

Code answers related to "C"

Browse Popular Code Answers by Language