Having problems with my program, please help!! :/

I'm having trouble getting my program to work. It displays the messages requesting the information in the main function. But it doesn't calculate any of my functions or display the results. Can someone please show me where I'm going wrong? Very new to programming....

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

void calculateCarpetSize(float roomlength, float roomwidth)
{
int carpetSize;
carpetSize = roomlength*roomwidth;
cin >> carpetSize;
}

void calculateCarpetCost(float carpetSize, double sellingPrice)
{
double carpetCost;
carpetCost = carpetSize*sellingPrice;
cin >> carpetCost;
}

void calculateLabourCost(float carpetSize)
{
double labourCost;
labourCost = carpetSize*24;
cin >> labourCost;
}

bool qualifyForDiscount(string customerNo)
{
char computeDiscount;
return (customerNo[0] == '0');
}

void computeDiscount()
{
float discount;
cout << "Please enter discount %:" << discount << endl;
cin >> discount;
}

void printCustomerStatement(string customerNo, string customerName, float carpetCost, float labourCost, float discount)
{
double subtotal, subtotal2, total, tax;
tax = 14;

cout << "CROSWELL CARPET STORE STATEMENT" << endl;
cout << "Customer name: " << customerName << endl;
cout << "Customer number: " << customerNo << endl;
cout << "Carpet price: " << carpetCost << endl;
cout << "Labour: " << labourCost << endl;
subtotal = carpetCost+labourCost;
cout << "Subtotal: " << subtotal << endl;
cout << "Less discount: " << discount << endl;
subtotal2 = subtotal-discount;
cout << "Subtotal after discount: " << subtotal2 << endl;
cout << "Plus tax: " << tax << "%" << endl;
total = subtotal2*14-0;
cout << "Total: " << total << endl;
}

int main()
{
string customerNo;
string customerName;

float roomLength;
float roomWidth;
float sellingPrice;
float carpetCost;
float labourCost;
float discount;

int carpetSize;

cout << setprecision(2) << fixed;
cout << "\nPlease enter the following information: ";
cout << "\n Customer name: ";
cin >> customerName;

cout << "\n Customer number: ";
cin >> customerNo;

cout << "\n The length of the room: ";
cin >> roomLength;

cout << "\n The width of the room: ";
cin >> roomWidth;

cout << "\n The carpet selling price: ";
cin >> sellingPrice;

calculateCarpetSize(roomLength, roomWidth);
calculateCarpetCost(carpetSize, sellingPrice);
calculateLabourCost(carpetSize);

if (qualifyForDiscount(customerNo))
computeDiscount();
else
discount = 0.0;

printCustomerStatement(customerNo, customerName, carpetCost, labourCost, discount);

return 0;

} // end main
don't you need ampersands in your void arguments, on the variables you want to change?
Topic archived. No new replies allowed.