// neatColumns3.cpp
//
// Displays table of powers of 2.5,
// with right-justified columns.
// Demonstrates the setw manipulator with
// floating-point numbers.
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
cout << "Powers of 2.5" << endl;
cout << "-------------" << endl << endl;
cout << "Exponent Power" << endl;
cout << "-------- -----" << endl << endl;
double power = 1;
int exponent = 0;
while ( power < 100000 )
{
cout << setw(5) << exponent << " "
<< setw(12) << setprecision(3)
<< setiosflags(ios::fixed)
<< power << endl;
power *= 2.5;
exponent++;
} // while
return 0;
} // function main