1. ## Random Number Issues

I am very new to C and have been tasked to produce a program that generates 1000 random numbers (with a max of 9) and then finds the total average. I have produced the following but it only seems to return 0 as the answer.

Code:
```// Program to determine the mean of 1000 random numbers //
// written by Kerim Morris 01/10/2010 //

#include <stdlib.h>

int max_count = 1000;         //declare the variables//
int count = 0;
int random_number = 0;
int random = 0;
int random_total = 0;
float mean = 0;

main()                       //start of main function//
{
{

for (count = 0; count < max_count; count ++);   //loop counter to a maximum//
//of 1000 //

random_number = (int)(10.0*rand()/(RAND_MAX+1.0));      //produce random//
// numbers between 0-9//

random_total = random_number + random_total;        //calculate the running //
// total//
}
mean = (random_total / max_count);           //calculate mean of total //
printf("The mean of 1000 random numbers equals %f");

}```
Any guidance would be appreciated.

2. Code:
`for (count = 0; count < max_count; count ++);   //loop counter to a maximum//`

3. I'm not quite sure what you mean, you seem to have repeated the same code I have but unfortunately there is no explanation.

4. Yeah I think his blue semi-colon where there shouldn't be a semi-colon isn't that visible.

5. Code:
`for (count = 0; count < max_count; count ++);   //loop counter to a maximum//`
There, that's a bit more obvious I think. At least when you've figured out that upside down, slightly off, italic exclemation point is in fact a semicolon.

6. 1) The semicolon isn't supposed to be there is their way of saying...
`mean = (random_total / max_count);`
`mean = ((float)random_total / max_count);`