Home > Back-end >  About flow output decimal control problem
About flow output decimal control problem

Time:05-08

# include
# include
using namespace std;
Void main ()
{
Float=20 x, y=400.00;
Cout & lt; Cout. Setf (ios: : showpoint);
Cout & lt; Cout. Unsetf (ios: : showpoint);
Cout. Setf (ios: : scientific);
Cout & lt; Cout. Setf (ios: : fixed);
Cout & lt; }


The code above

Output the following
20-400
20.0000 400.000
2.000000 e+01 4.000000 e+02
0 x1. 4000000000000 p + 4-0 x1. 9000000000000 p + 8



The output of the code and the book, why I and my book is not the same as
The output of the book:
20-400
20.0000 400.000
2.000000 e+001 4.000000 e+002
20-400

Why am I the final output is a very strange thing, I am using vs2019
Cout. Unsetf (ios: : showpoint); This is not to eliminate set format? Why do I have a lot of invalid output is 0, should not be an integer, and, what is the fourth in the output of p, hexadecimal is why
  • Related