I'm familiar with the convention of using %.2f
to set two decimal places for a float but is it in any way possible to change the number to a variable so that the user can state the number of decimal places displayed?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…