
Lesson 3-4: Value-Returning Functions
58 | Chapter 3
Name __________________________________________ Date _______________________
Section _________________________________________
Use the following shell for Exercises 1 and 2.
// Program UseFunctions demonstrates the use of library and
// user-defined functions.
#include <iostream>
#include <cmath>
using namespace std;
float answer(float, float, float);
int main ()
{
cout << fixed << showpoint;
cout << answer(_______, _______, ______);
return 0;
}
// Do you recognize this formula?
float answer(float one, float two, float three)
{
return ((- two + sqrt(pow(two, ______)
- (4.0 * one * three))) / (2.0 * one));
}
Exercise ...