c++ precision

C++ precision example:

In this link everything explained clearly….You can check

http://ltcpp.blogspot.com/2012/07/input-output-io-in-c.html

And basically if we want to make just like C in C++ fixed value after decimal point then it can be like this

In C:

In C++:

Both C and C++ will give the same result output:3.55