// adhira b cs1a ch 2 hw
/*******************************************************************************
*calculate total cost of five items.
*
*__________________________________________________________
* sums up 5 costs to calculate the total cost, then adds 6% tax
*____________________________________________________________
*INPUT
* item_1 - cost of item 1
* item_2 - cost of item 2
* item_3 - cost of item 3
* item_4 - cost of item 4
* item_5 - cost of item 5
* Total - sum of all
*OUTPUT
* code adds then prints the total purchase amount.
*******************************************************************************/
#include <iostream>
#include <string>
using namespace std;
int main ()
{
//initialize 5 items.
float item_1;
float item_2;
float item_3;
float item_4;
float item_5;
//5 prices input
cin.ignore();
cout << "how much is item one? " << endl;
cin >> item_1;
cout << "how much is item two? " << endl;
cin >> item_2;
cout << "how much is item three? " << endl;
cin >> item_3;
cout << "how much is item four? " << endl;
cin >> item_4;
cout << "how much is item five? " << endl;
cin >> item_5;
//calculate Total
float subtotal = item_1 + item_2 + item_3 + item_4 + item_5;
float tax = subtotal * .06;
float Total = subtotal + tax;
//Print out subtotal, tax, then total of five items.
cout << "subtotal: $" << subtotal << endl;
cout << "tax: $" << tax << endl;
cout << "total: $" << Total << endl;
return 0;
}