C++
Essay by 24 • November 30, 2010 • 929 Words (4 Pages) • 1,176 Views
#include <iostream>
#include <iostream>
using namespace std;
int main()
{
float amt = 1, tax, total = 0, paid, change;
const float VAT = 0.14;
const string storedPassword = "cleveland";
string password;
cout <<endl;
cout << "(Press the return key after each item, and 0.00 to EXIT!)"<<endl;
//amt = 0;
cout<<endl;
cout << "Please enter your password: ";
cin >> password;
if(password == storedPassword)
{
while (amt != 0.00)
{
cout << "Amount: R";
cin >> amt;
total += amt;
}
cout << endl;
tax = total * VAT;
total = total + tax;
cin.get();
cout.setf(ios::fixed);
cout.precision(2);
cout << "==========================="<<endl;
cout << "TOTAL: ";
...
...