Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - How to set the output format of cout
How to set the output format of cout
You mean to use c++ for accurate output; There are two ways to format the output of cout. One is to use cout member variables, such as Cout. Width (10); cout & lt

The function provided in it sets the precision: use setprecision to control the output precision.

Use example: cout

setprecision(5)

comment

Load more