56.23 salary | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

56.23 salary

why is the output given in 56.230000

21st Jan 2020, 6:30 PM
haren
haren - avatar
1 Answer
+ 4
Use "%.2f" Edit to be complete: printf("%.2f", salary);
21st Jan 2020, 6:37 PM
Mihai Apostol
Mihai Apostol - avatar