How do I round off floating point numbers to my specific number of decimal places in C Language? | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
0

How do I round off floating point numbers to my specific number of decimal places in C Language?

For example, printf(" this is a value %f\n ", 3.141592) 👆Round that off to make it 3.14

8th Jun 2021, 12:40 AM
Mwamba
1 Antwort
+ 1
%.2f
8th Jun 2021, 12:56 AM
Michal Doruch