Question: CCODE: NOT allowed to use pow function A Summation formula is defined as: sum(n, k) no + n1 + n2 + + nk for example:
CCODE:
NOT allowed to use "pow" function

A Summation formula is defined as: sum(n, k) no + n1 + n2 + + nk for example: Write a C program to ask user input a decimal n and an integer k and return a correct summation following the formula defined above. The C program is required to use Recursion function (a function calling itself) to achieve this purpose. At least, when calculating some power of n, you are required to use Recursion to evaluate the power of n. Name your file Hw3_q2_code.c. Hint: write a pow function with recursion method learned from the textbook or instructor's Ch4 slides (Not allowed to use pow in math.h library) and test it function well. Example inputs Please input n = 6.5 Please input k-s Example Output: Sum 13712.34375
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
