The last homework assignment, con't
// Prompts for data input from the user.
void getData(int customer, int &sqYards, float &costPerSqYard,
float &discountPercentage, float &laborPerSqYard,
float &floorPrep)
{
// Lets the user know who to enter data for. Prompts follow.
cout << "Accepting data for customer " << customer << endl << endl;
cout << "Enter amount of carpeting purchased in square yards: ";
cin >> sqYards;
cout << "Enter the cost per square yard of carpeting: $";
cin >> costPerSqYard;
cout << "Discount for carpeting as a decimal.";
cout << "Example: enter 10% discount as: 0.10." << endl;
cout << "Enter discount for carpeting: ";
cin >> discountPercentage;
cout << "Enter the cost per square yard of labor: $";
cin >> laborPerSqYard;
cout << "Enter the cost of floor preparation: $";
cin >> floorPrep;
cout << endl;
}
Next page
Previous page
Go to Lesson 7 index.