Question: This program should be done in c++, not javascript or python. ET-575 - WK13 - In Class Assignment 1. Write a program to iteratively calculate

This program should be done in c++, not javascript or python.

This program should be done in c++, not javascript or python. ET-575

ET-575 - WK13 - In Class Assignment 1. Write a program to iteratively calculate exponents. a) Create a function exponentiate that accepts an integer n and exponent value exp then outputs the calculation of nexp b) Test your function with a few values for n 2. Write a program to iteratively calculate factorial. a) Create an iterative function named factorial that accepts an integer n and outputs n! b) The function should output each step of the calculation. c) Test your function with a few values for n Output Example 5!-- 54321120 3. Recreate program 2 using a recursive solution. 4. Write a program that recursively counts down from n. a) Create a void recursive function named countdown that accepts an b) Test your function with a few values for n. Output Example integer n, and progressively decrements and outputs the value of n. 5. Write a program that recursively outputs a given integer in reverse. a) Create a void recursive function that accepts an integer n and outputs the number backwards. b) Test your function with a few values for n Output Example Write backward (3) 3 Write backward (12) : 21 Write_backward (123) 321 Write backward (2017) 7102

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!