I have this code:
double a = 7.456789;
cout.unsetf(ios::floatfield);
cout.precision(5);
cout << a;
and also this one:
double a = 798456.6;
cout.unsetf(ios::floatfield);
cout.precision(5);
cout << a;
the result of the first code is: 7.4568 Which is almost what I want (what I want to recieve is 7.4567) the result of the second : 7.9846e+05 Which is not at all what I want (I want 798456.6) I want to print the number till 4 numbers after the decimal point
How can I do that ?