Void Functions: Finding the total cost of a item

I missed last class on doing void functions because I got sick and im completely lost! ive being using the texts book example for a reference but its not running ! Can someone please help me alter my code so it will work

the output should look similar to this:
how much was your shirt?
20
shirt 20.00
tax =1.20
the total 21.20


include <iostream>
#include <iomanip>
using namespace std;

void getShirtCost(double shirtCost);
void calculate(double shirtCost,double taxAmount, double total, double taxamount) ;
void printReceipt(double shirtCost, double taxAmount, double total, double taxamount);
int main ()
{
//declaration secetion

double shirtCost, taxAmount,total,taxamount;
cout<< fixed<<showpoint;
cout.precision(2); //sets the 'double/float' data types 2 decimal places

cout<<"Enter the proce of the t-shirt<"<< endl;

getShirtCost(shirtCost);
calculate(shirtCost,taxAmount,total,taxamount);
printReceipt(shirtCost,taxAmount,total,taxamount);

system ("PAUSE");
return 0;
}
void getShirtCost(double shirtCost)
{
cin >> shirtCost;
}

void calculate(double shirtCost,double taxAmount, double total, double taxamount )
{
taxAmount= 6;
taxamount= shirtCost*taxAmount*.01;
total= shirtCost+taxamount;
}

void printReceipt(double shirtCost, double taxAmount, double total, double taxamount)
{
cout << "This is your shirt cost" <<shirtCost<< endl;
cout << "This is your tax amount" <<taxamount<< endl;
cout << "Your overall total is" << total<< endl;
}
Arguments passed by value and by reference http://www.cplusplus.com/doc/tutorial/functions/
Topic archived. No new replies allowed.