//* Example of formating printout *

#include <iostream> #include <iomanip> using namespace std; int main() { cout << showpoint << fixed << setprecision(2); /* OLDER COMPILES with .h libraries: cout << setiosflags(ios::showpoint) << resetiosflags(ios::fixed) << setiosflags(ios::fixed) << setprecision(2); */ cout << setw(15) << 123456.789012E-2 << endl; cout << setw(15) << 123456.789012E-5 << endl; cout << setw(15) << 1 << endl; cout << setw(15) << 123456.789012E+2 << endl; cout << setw(15) << 123456.789012 << endl; return(0); } /* 1234.57 1.23 1 12345678.90 123456.79 Press any key to continue */