127,142 views
34 votes
34 votes
What is the output from main (below) after the following function is called. void calculateCost(int count, double& subTotal, double& taxCost) // definition { if ( count < 10) subTotal = count * 0.50; else subTotal = count * 0.20; taxCost = 0.1 * subTotal; } int main() { double tax = 0.0, subTotal = 0.0; calculateCost(15, subTotal, tax); // function call cout << "The cost for 15 items is " << subTotal << ", and the tax for "<< subTotal << " is " << tax << endl; return 0; }

User Damien Fayol
by
2.2k points

1 Answer

15 votes
15 votes

Answer:

Step-by-step explanation:

User JoergVanAken
by
2.6k points