// Eric Bernal Chapter 2, P. 81 #3 CS1A
/******************************************************************************
Compute total transaction
*_______________________________________________________________________________
This program will calculate the total amount of a transaction including tax.
Computation is based on this formula:
Total = Purchase x State Tax x Country Sale Tax
*_______________________________________________________________________________
INPUT
Purchase : Purchase amount before tax
Statetax : State tax
Countrytax : Country's sale tax
OUTPUT
Total : Total amount after all taxes
*******************************************************************************/
#include <iostream>
using namespace std;
int main() {
float Purchase; //INPUT: Purchase amount before tax
float Statetax; // INPUT: State tax
float Countrytax; //INPUT : Country sale tax
float Total; // OUTPUT : Total amount including tax
// Program Variables
Purchase = 52;
Statetax = 4;
Countrytax = 2;
// Total formula computation
Total = Purchase * Statetax * Countrytax;
//Output result
cout << "The total amount is " << Total << endl;
return 0;
}