how to change int to float code example Example: int to float c float percentage; percentage = (float)number/total * 100;