random number generator from 0 to 2 in c code example
Example: 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("%d\n", randomnumber);
return 0;
}