convert int to float cpp code example
Example 1: int to float c++
int a = 3;
float b = (float)a;
Example 2: int to float c
float percentage;
percentage = (float)number/total * 100;
int a = 3;
float b = (float)a;
float percentage;
percentage = (float)number/total * 100;