What is the output of the following function and function call?

void calculateCost(int count, float& subTotal, float& taxCost);

float tax = 0.0,
subTotal = 0.0;

calculateCost(15, subTotal,tax);
cout << "The cost for 15 items is " << subtotal
<< ", and the tax for " << subTotal << " is " << tax << endl;
//end of fragment

void calculateCost(int count, float& subTotal, float& taxCost)
{
if ( count < 10)
{
subTotal = count * 0.50;
}
else
{
subTotal = count * 0.20;
}
taxCost = 0.1 * subTotal;
}
a. The cost for 15 items is 3.00, and the tax for 3.00 is 0.30;
b. The cost for 15 items is 0.00, and the tax for 3.00 is 0.00;
c. The cost for 15 items is 0.00, and the tax for 3.00 is 0.30;
d. The cost for 15 items is 3.00, and the tax for 3.00 is 0.00;


a. The cost for 15 items is 3.00, and the tax for 3.00 is 0.30;

Computer Science & Information Technology

You might also like to view...

Which of the following statements are true?

a. A Scene is a Node. b. A Shape is a Node. c. A Stage is a Node. d. A Control is a Node. e. A Pane is a Node.

Computer Science & Information Technology

How would you write the following algebraic equation in C++?

A. c = a+b / a-b B. c = (a+b / a-b) C. c = (a-b)/(a+b) D. c = (a+b)/(a-b)

Computer Science & Information Technology

Briefly describe IGMP.

What will be an ideal response?

Computer Science & Information Technology

A value that does not change.

What will be an ideal response?

Computer Science & Information Technology