int to float c

C
# you can cast in c like so
float my_float= 1.446;
int my_int = (int) my_float;float percentage;
percentage = (float)number/total * 100;
Source

Also in C: