Recursive Function
8. Chapter 6 , “C Control Statements: Looping,” ( Listing 6.20 ) shows a power() function
that returned the result of raising a type double number to a positive integer value.
Improve the function so that it correctly handles negative powers. Also, build into the
function that 0 to any power other than 0 is 0 and that any number to the 0 power is 1.
(It should report that 0 to the 0 is undefined, then say it’s using a value of 1.) Use a loop.
Test the function in a program.
9. Redo Programming Exercise 8, but this time use a recursive function.
9 years ago
10
Answer(1)![blurred-text]()
![]()
Purchase the answer to view it

- documentation.docx
- c_file.rar
Bids(1)
other Questions(10)