Possible Duplicate:
In C, how do I get a specific range of numbers from rand()?
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int main(int argc, char** argv) {
srand(time(NULL));
int r = rand();
printf("%d\n", r);
return (EXIT_SUCCESS); }
i have this code and i want to make random numbers from 1-6 and fill with them a board [40] any ideas?