// Mr. Minich
// CMPSC 201
// Ch. 3 Demo Program #1
// January 30, 2000
// Purpose - to illustrate the declaration and use of constants
#include <iostream>
using namespace std;
int main()
{
const double PA_SALES_TAX = 0.06; // the PA sales tax rate
double price = 0.0; // the price of a purchase
int quantity = 0; // the quantity of products purchased
// The variables, price and quantity, are declared AND initialized in the statements above
// PA_SALES_TAX is a constant (which must be defined to be a certain value.)
// Notice the identifier for the constant is typed in all caps with underscores separating consecutive words.
cout << "The price is " << price << endl;
cout << "The quantity is " << quantity;
cout << "\nThe PA sales tax rate is " << PA_SALES_TAX << endl;
// After the first cout statement endl is used to produce a new line.
// After the second cout statement, the escape sequence, '\n', is added to the beginning of the string literal
// in the third statement in order to produce a new line. I've used both methods for demonstration only. You
// should be as consistent as possible when creating new lines.
return 0;
}// end of main