Mega Code Archive
Fixed format with precision of 7
#include
#include
using namespace std;
int main()
{
cout << "Default format: " << 123.123456789 << endl;
cout << "Fixed format with precision of 7: ";
cout << setprecision(7) << fixed << 123.123456789 << endl;
return 0;
}