int to float c
snippet in c

c float to int

user4442

# you can cast in c like so
float my_float= 1.446;
int my_int = (int) my_float;

int to float c

user9073

float percentage;
percentage = (float)number/total * 100;