//----------------------------------------------------------------------
//  powsof2.cpp
//  This program outputs the powers of 2 from 1 through 10.
//  NOTE: 2^n denotes 2 raised to the nth power
//----------------------------------------------------------------------
#include <iostream.h>
#include <iomanip.h>        // For setw()
#include "powers.h"         // For PowerOfInt()

int main()
{
    int power;

    cout << "       Power   2 ^ Power \n"
         << "       -----   --------- \n";

    for (power = 1; power <= 10; power++)
                       // INV (prior to test):
                       //     2^1, 2^2, ..., 2^(power-1) have been output
                       //  && power <= 11
        cout << setw(10) << power
             << setw(13) << PowerOfInt(2, power) << '\n';

    return 0;
}


