Question: please help in C++ visual studio please help with recursion!!! Problem 2 (40pt): Implement the following function using recursion. This function com- putes the value
Problem 2 (40pt): Implement the following function using recursion. This function com- putes the value of c". n could be either positive or negative or zero. double mypower (double x, int n); Write a main function to compute 3.14" for integers n from -5 to 4. Keep 5 digits after the decimal point and store them in a file named "powers.txt". The file should look exactly as the following: Instructions: (5pt) Put all your code in one cpp file, named mypower.cpp, and submit it to ccle.ucla.edu. Write your code with good coding practices. Comment on your code to make it read- able and add description of files in the beginning to show your ownership. (35pt) Compile your code and run your program to check for compile-time errors and logic errors. Your output should follow the format as follows. Remember to check your homework with PIC lab desktop if you don't code with VS 2019. You may lose the majority of points if your code doesn't compile. 1 powers.txt 1 0.00328 20.01029 3 0.03230 4 0.10142 5 0.31847 6 1.00000 7 3.14000 8 9.85960 9 30.95914 10 97.21171
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
