Question : convert string to float c
Answered by : adventurous-albatross
char myString = "6.88";
float x = atof(myString);
//x is now 6.88
Source : | Last Update : Thu, 27 Feb 20
Question : int to float c
Answered by : marton
float percentage;
percentage = (float)number/total * 100;
Source : https://stackoverflow.com/questions/13530209/how-to-convert-int-to-float-in-c | Last Update : Wed, 02 Dec 20