| <<< Scientific Notation | Index | More Manipulator Examples >>> |
Normalized scientific notation expects absolute part A(*) of the number A×10b to be in the range
1 <= A < 10
Try the following program to convert numbers from scientific notation to ordinary decimal notation:
#include <iostream>
#include <iomanip>
using namespace std;
int main() {
for (;;) {
double dbl;
cin >> dbl;
cout << setw( 14 ) << showpoint << dbl << '\n';
}
return 0;
}
________________
(*) the absolute part A is also known as mantissa.
| <<< Scientific Notation | Index | More Manipulator Examples >>> |