c++ precision

C++ precision example:

In this link everything explained clearly….You can check


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

Spread the love