What is the output of the following function and function call?
Void calculateCostint count, float& subTotal, float taxCost) ;
Float tax = 0.0,
Subtotal = 0.0;
CalculateCost15, subtotal,tax) ;
Cout << "The cost for 15 items is " << subtotal
<< ", and the tax for " << subtotal << " is " << tax << endl;
//end of fragment
Void calculateCostint 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;
Correct Answer:
Verified
Q29: If you need a function to get
Q30: Which of the following is true for
Q31: The postcondition of a function
A) determines how
Q32: You should make a parameter a reference
Q33: What is the correct way to call
Q35: Using functions in a program is called
Q36: Which of the following are true?
A) a
Q37: Which of the following is a legal
Q38: What is wrong with the following function
Q39: A _ is a simplified version of
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents