Why this app not accepting setprecision | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Why this app not accepting setprecision

10th Oct 2017, 1:33 PM
Shubhangi Tripathi
3 Answers
+ 14
#include <iostream> #include <iomanip> // ... std::cout << std::fixed << std::setprecision (your desired precision); // ... do stuff
10th Oct 2017, 2:35 PM
Babak
Babak - avatar
+ 10
Works just fine for me. You might have to post your code for inspection.
10th Oct 2017, 1:52 PM
Hatsy Rei
Hatsy Rei - avatar
+ 7
You don't show code so I'm just guessing, but you may need to #include <iomanip>
10th Oct 2017, 1:55 PM
Kirk Schafer
Kirk Schafer - avatar