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.