Here is some "pseudo" c++ code
double var = 5.5;
cout << var << endl;
double var2 = 6.0;
cout << var2 << endl;
5.5
6
The problem is that some code might expect that it's 6.0. Does someone has an idea how to change the output stream.
Okay here is some example code i tried
double t = 6.0;
while (t > 0.1) {
t = t - 0.1;
cout << setprecision(2) << t << endl;
}
The output is
5.9
5.8
...
5.2
5.1
5
4.9
4.8
4.7