IntroProgwC++_8e_Ch09_Solution Files -Review Questions and Exercises

docx

School

Eversity, University of Arkansas System *

*We aren’t endorsed by this school

Course

701

Subject

Computer Science

Date

Feb 20, 2024

Type

docx

Pages

2

Uploaded by GeneralCrown811

Report
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) 6. d double getFee(int base, double rate) 7. d double getFee(int, double); 8. d none of the above 9. d by value 10. c scope 11. a calcGross 12. a True 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); 4. cout << 50 + rand() % (100 – 50 + 1); 5. sqRoot = sqrt(num); 6. char getCharacter() { char response = ' '; cout << "Enter a character: "; cin >> response; return response; } //end of getCharacter function char getCharacter(); custCode = getCharacter(); 7. answer = pow(num1, 3) + sqrt(num2); 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 in the TryThis12.cpp file, which is contained in either the Cpp8\Chap09\TryThis12 Project-IM folder (Microsoft) or the Cpp8\Chap09 folder (non-Microsoft). 13. See the ModifyThis13.cpp file, which is contained in either the Cpp8\Chap09\ModifyThis13 Project-IM folder (Microsoft) or the Cpp8\Chap09 folder (non-Microsoft). 14. See the ModifyThis14.cpp file, which is contained in either the Cpp8\Chap09\ModifyThis14 Project-IM folder (Microsoft) or the Cpp8\Chap09 folder (non-Microsoft).
15. See the ModifyThis15.cpp file, which is contained in either the Cpp8\Chap09\ModifyThis15 Project-IM folder (Microsoft) or the Cpp8\Chap09 folder (non-Microsoft). 16. See the Introductory16.cpp file, which is contained in either the Cpp8\Chap09\Introductory16 Project-IM folder (Microsoft) or the Cpp8\Chap09 folder (non-Microsoft). 17. See the Introductory17.cpp file, which is contained in either the Cpp8\Chap09\Introductory17 Project-IM folder (Microsoft) or the Cpp8\Chap09 folder (non-Microsoft). 18. See the Introductory18.cpp file, which is contained in either the Cpp8\Chap09\Introductory18 Project-IM folder (Microsoft) or the Cpp8\Chap09 folder (non-Microsoft). 19. See the Intermediate19.cpp file, which is contained in either the Cpp8\Chap09\ Intermediate19 Project-IM folder (Microsoft) or the Cpp8\Chap09 folder (non-Microsoft). 20. See the Intermediate20.cpp file, which is contained in either the Cpp8\Chap09\Intermediate20 Project-IM folder (Microsoft) or the Cpp8\Chap09 folder (non-Microsoft). 21. See the Intermediate21.cpp file, which is contained in either the Cpp8\Chap09\Intermediate21 Project-IM folder (Microsoft) or the Cpp8\Chap09 folder (non-Microsoft). 22. See the Advanced22.cpp file, which is contained in either the Cpp8\Chap09\Advanced22 Project-IM folder (Microsoft) or the Cpp8\Chap09 folder (non-Microsoft). 23. See the Advanced23.cpp file, which is contained in either the Cpp8\Chap09\Advanced23 Project-IM folder (Microsoft) or the Cpp8\Chap09 folder (non-Microsoft). 24. See the Advanced24.cpp file, which is contained in either the Cpp8\Chap09\Advanced24 Project-IM folder (Microsoft) or the Cpp8\Chap09 folder (non-Microsoft). 25. See the Advanced25.cpp file, which is contained in either the Cpp8\Chap09\Advanced25 Project-IM folder (Microsoft) or the Cpp8\Chap09 folder (non-Microsoft). 26. See the SwatTheBugs26.cpp file, which is contained in either the Cpp8\Chap09\SwatTheBugs26 Project- IM folder (Microsoft) or the Cpp8\Chap09 folder (non-Microsoft). To debug the program, change the function call to milesPerGal = calcMpg(miles, gallons); .
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help