nyxon
Newbie level 2
i m tryin to create a dice for which random no. generation is necessary.
i had used rand() function under stdlib.h but it keeps on givin the same no.
what are other method of generation random no. using C language
my code was like this
int r;
r=rand()%7;
this should generate random no. between 0 to 6 but instead it generated only 2 every time it is executed.
plz help!!
i had used rand() function under stdlib.h but it keeps on givin the same no.
what are other method of generation random no. using C language
my code was like this
int r;
r=rand()%7;
this should generate random no. between 0 to 6 but instead it generated only 2 every time it is executed.
plz help!!