An Introduction to Programming with C++: Eighth Edition
Chapter 9 Answers
Review Questions
1. a one value only
2. d all of the above
3. c The name of each actual argument should be identical to the name of its corresponding formal
parameter.
4. d a formal parameter
5. c double calcTax(double salesAmount)
Exercises – Pencil and Paper
1. The answer to this TRY THIS Exercise is located at the end of Chapter 9 in the book.
2. The answer to this TRY THIS Exercise is located at the end of Chapter 9 in the book.
3. answer = pow(3, 16);
{
char response = ‘ ‘;
cout << “Enter a character: “;
8. answer = sqrt(pow(x, 2) * pow(y, 3));
9. answer = pow(x / y, 4) – 10;
10. double getSalesTax(double sold, char code, double rate)
Exercises – Computer
11. The answer to this TRY THIS Exercise is located at the end of Chapter 9 in the book. The code is entered
in the TryThis11.cpp file, which is contained in either the Cpp8\Chap09\TryThis11 Project-IM folder
(Microsoft) or the Cpp8\Chap09 folder (non-Microsoft).
12. The answer to this TRY THIS Exercise is located at the end of Chapter 9 in the book. The code is entered