Assume that x is a double variable that has been initialized . Write a statement that prints it out, guaranteed to have a decimal point, but without forcing scientific (also known as exponential or e-notation).

1
Assume  that x is a double  variable  that has been initialized . Write a statement  that prints it out, guaranteed to have a decimal point, but without forcing scientific (also known as exponential or e-notation).

LANGUAGE: C++

CHALLENGE:

Assume  that x is a double  variable  that has been initialized . Write a statement  that prints it out, guaranteed to have a decimal point, but without forcing scientific (also known as exponential or e-notation).

SOLUTION:


cout << std::fixed << x;

One comment

Add comment