Firstly, the specific error is generated because the "%" operator is undefined for float. You need to perform an explicite type cast before, either (long)temp % 1000 or (int)temp % 1000. The correct type depends on the number range of temp.
Secondly, temp=(i*795)/100 doesn't work if i has an int type and it's value is larger than 41. You should write i*7.95 instead.
Finally, it's a stupid idea to use float in this place, because you are performing pure integer arithmetic. Define temp as long and use a type cast in the conversion
temp=((long)i*795)/100;
A more convenient method for the decimal number display uses sprintf() by the way.