The program is supposed to be printing 21 different numbers that are randomly generated. Why am I getting the same number 21 times?

Using dev C++ compiler.

Code:/*prints random numbers between 1 - 99*/ #include <stdio.h> #include <stdlib.h> #include <time.h> #define MAXR 99; #define MINR 2; double random(void); int main(void) { double sides[7][3]; double ran_num; int i, n; for(n=0;n<3;n++) { for(i=0;i<7;i++) { ran_num = random(); sides[i][n] = ran_num++; } } for(n=0;n<3;n++) { printf("\n\n") ; for(i=0;i<7;i++) { printf("%.2f ", sides[i][n]); } } system("PAUSE"); return 0; } double random(void) { srand(time(NULL)); int r; r = rand()%MAXR + MINR; return(r); }