how to now int or float in c code example
Example 1: int to float c
float percentage;
percentage = (float)number/total * 100;
Example 2: what is float in c
float: It is used to store decimal numbers (numbers with floating point value) with single precision. double: It is used to store decimal numbers (numbers with floating point value) with double precision.