// CMPSC 101 Ch. 1 Demo #2
// Purpose - to illustrate a simple program with constants, assignment statements
//           and input with cin

#include <iostream>
using namespace std;

int main()
{
   // **** constants *************************************************

   const double SALES_TAX = 1.06;      // state sales tax
   const double PRICE_PER_BOOK = 9.99; // price per book

   // **** variable declarations **************************************

   int numBooks = 0;                   // number of books purchased by customer
   double totalCost = 0.0;             // total amount of customer's book purchase

   // **** inputs *****************************************************

   cout << "Enter the number of books you'd like to buy: ";
   cin >> numBooks;

   // **** computations ***********************************************

   totalCost = numBooks * PRICE_PER_BOOK * SALES_TAX;

   // **** outputs ****************************************************

   cout << "The total cost is $" << totalCost << endl;

   return 0;
}//end of main