+ 1

c array printf("Purchases total is %6.2f\n", total); what does 6.2 signifies here?

25th Jan 2020, 5:02 PM
Tarala Trilokesh
Tarala Trilokesh - avatar
2 Respuestas
+ 4
6 numbers to the left of decimal & 2 numbers to the right of decimal
25th Jan 2020, 5:10 PM
BroFar
BroFar - avatar
+ 4
Please refer to this reference. Pay close attention to the "width" and "precision" table 👍 http://www.cplusplus.com/reference/cstdio/printf/ (Edited)
25th Jan 2020, 5:23 PM
Ipang