The original code for “Homework 3” that has to be modified inProblem 2:
#include <iostream>
#include <cmath>
using namespace std;
// Function Declarations
double my_exp(double x, int n);
double my_sin(double x, int n);
double my_cos(double x, int n);
long int factorial(int x);
int main(){
double val;
cout << “Value at which to calculate exp, sin, andcos:” << endl;
cin >> val;
for(int i=1; i<=20; i++){
cout << “exp(” << val << “, ” <<i << “) = ” << my_exp(val, i) <<
endl;
}
cout << “**************” <<endl;
for(int i=1;
OR
OR