expand icon
book C++ Programs to Accompany Programming Logic and Design 8th Edition by Jo Ann Smith cover

C++ Programs to Accompany Programming Logic and Design 8th Edition by Jo Ann Smith

Edition 8ISBN: 978-1285867410
book C++ Programs to Accompany Programming Logic and Design 8th Edition by Jo Ann Smith cover

C++ Programs to Accompany Programming Logic and Design 8th Edition by Jo Ann Smith

Edition 8ISBN: 978-1285867410
Exercise 18
Writing Functions that Return a Value
In this exercise, you use what you have learned about writing functions that return a value to answer Questions.
Given the following variable declarations and function calls, write the function's header:
a.
double price, percent, newPrice; newPrice = calculateNewPrice(price, percent);
b.
double area, one_length, two_length; area = calcArea(one_length, two_length);
c.
string lowerCase, upperCase; upperCase = changeCase(lowerCase);
Explanation
Verified
like image
like image

a. Function header for function call cal...

close menu
C++ Programs to Accompany Programming Logic and Design 8th Edition by Jo Ann Smith
cross icon