PROJECT #4
Due: 19 November 1998
Write a program that contains four functions:
- The first function return the square of the double passed to it.
- Second function returns the cube of the double passed to it.
- Third function returns the double-precision area of a circle whose
radius is the length of the double passed to it.
- Fourth function returns the value of a polynomial given this formula:
9x4 + 15x2 + x1
where x is a double that is passed from main().
The main() function is to get the value of the double from the user
and then use that value to call the four functions in turn. main() is also
required to print out the values returned from the functions. Output
will look like (User input is in red):
Enter a floating point number: 3.14
The square of 3.14 is 98.596.
The cube of 3.14 is 30.959.
The radius of circle whose diameter is 3.14 is 30.9748207.
The value of the polynomial is 151.034 when x is 3.14.
Make sure to include the function prototypes for all functions, except
main().
Standards
Make sure you follow the standards required for this course!
I have listed them on my homepage for quick reference.