c++ - Set Precision for double -


I am trying to set the number two decimal numbers for the user to double type of data, and I have an appropriate header file But the result of the demonstration is only integer, not a decimal? I really appreciate any help

You want to use the following format.

  cout & lt; & Lt; Set CPC (# of last decimal places) & lt; & Lt; Fixed & lt; & Lt; VarName & lt; & Lt; Endl;   

There is a fixed input output manipulator which tells you that you are determining the accuracy for the number of locations after the decimal point.

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -