http://www.learncpp.com/cpp-tutorial/25-floating-point-numbers/ I have been about this lately to review C++.
In general computing class professors tend not to cover thes
You want to use the manipulator called "Fixed" to format your digits correctly so they do not round or show in a scientific notation after you use fixed you will also be able to use set the precision() function to set the value placement to the right of the . decimal point. the example would be as follows using your original code.
#include
#include
int main() {
using namespace std;
#include
double dValue = 0.19213;
cout << fixed << setprecision(2) << dValue << endl
}
outputs as:
dValue = 0.19