here is my program
I don't know how to get it to exclude 0, i've tried if statements already and such. Also I don't know how to set up the minum value of the random numbers, can anyone help me with that. Like say I wanted to do 2-8...Thanks in advance.Code:#include<stdio.h> #include<time.h> main() { float i,r; srand( time( 0 ) ); for(i=1;i<5;i++){ r=rand()%40; r=r/5; if(i>1){ printf("%1.0f\n",r); } } printf("Hit any key to exit\n"); getchar(); return 0; }