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;
d. The cost for 15 items is 3.00, and the tax for 3.00 is 0.00;
You might also like to view...
An operand is a mathematical symbol
Indicate whether the statement is true or false
A technician has been dispatched to a client’s office to diagnose wireless network issues and suspects that channel overlap may be the problem. Which of the following tools will the technician use to help in determining whether her suspicions are correct?
A. Toner probe B. Cable tester C. Loopback plug D. Wi-Fi analyzer