Write function sum-one that uses a loop statement


Problem

A. Write function sum1 that uses a loop statement to find the sum of numbers from 1 to n. Also, write the main() function to test the function sum1.

B. Write recursive function sum2 to find the sum of numbers from 1 to n. Also, write the main() function to test the function sum2.

C. Write function power1 that uses a loop statement to find the nth power of a number. Also, write the main() function to test the function power1.

D. Write recursive function power2 to find the nth power of a number. Also, write the main() function to test the function power2.

Request for Solution File

Ask an Expert for Answer!!
Programming Languages: Write function sum-one that uses a loop statement
Reference No:- TGS03234008

Expected delivery within 24 Hours