Essays24.com - Term Papers and Free Essays
Search

C++

Essay by   •  November 30, 2010  •  929 Words (4 Pages)  •  1,093 Views

Essay Preview: C++

Report this essay
Page 1 of 4

#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: ";

...

...

Download as:   txt (1.9 Kb)   pdf (48.3 Kb)   docx (8.8 Kb)  
Continue for 3 more pages »
Only available on Essays24.com