The indexes come out sometimes too low,some times too high and I don't really understand why if the variable calculations come out right every time.
Here's my code for it:
//calculates average letters per 100 words
float L = (((float)letters * 100.0) / (float)words);
//calculates average sentences per 100 words
float S = (((float)sentences * 100.0) / (float)words);
// calculates the index
float index = (0.0588 * L) - (0.296 * S) - 15.8;
printf("%f\n",index);
Any help is greatly appreciated.