Answers for "how to round floats"

0

how to round floats

//In the %.1f the 1 represents tenths if we put 2f then it would be hundreths, 
//aka: (1.28) while the 1f would be (1.3).

perc = 1.28278268
VARIABLE = "%.1f" % perc
Posted by: Guest on March-31-2022

Browse Popular Code Answers by Language