// pgm10 -- const (named constants) // and formatting output // 9/19/16 #include #include using namespace std; int main() { const double INTEREST_RATE=1.05791; double principal=10000; cout << "Interest rate is: " << INTEREST_RATE << "%" << endl << "principal is: $" << setw(10) << principal << endl << fixed << setprecision(2) << "and interest earned is: $" << INTEREST_RATE/100*principal << endl << endl; cout << "does it get rounded? " << INTEREST_RATE << endl; cout << setprecision(5); cout << "value of INTEREST RATE: " << INTEREST_RATE << endl; return 0; }