how to modify the cout format of float?

int main()
{
float a = 3300.05;
cout << "a = " << a << endl; // a= 3300.05
float b = 33000.05;
cout << "b = " << b << endl; // b= 33000.1
float c = 1234567;
cout << "c = " << c << endl; // c= 1.23457e6
}

How can I change the output of b and c to 33000.05 and 1234567.00?
Thanks for reading.
 
cout << fixed << setprecision( 2 ) << a << endl;
Topic archived. No new replies allowed.