Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

//declaring functions double cos_N (double x, int N) double cos_delta(double x,

ID: 1809311 • Letter: #

Question

//declaring functions double cos_N (double x, int N) double cos_delta(double x, double delta ) int factorial (int n ) double power ( double x, int n) # define PI 3.14 // NO < M A T H .h > ALLOWED !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! cos_N (double x, int N) //N terms { if ( x> 0) N += x ; return N ; } //end of function cos_delta(double x, double delta ) //What do I do here ?? { } factorial (int n) { int Factorial = 0 ; for ( n = 3 ; n < =12 ; n++ ) { Factorial * =n ; } return Factorial ; //end of function power ( double x, int n) { x =1 ; for ( n = 1 ; n > 0 ; n = n + 2 ) { x *= ( -n) ; } return x ; } int main () //How do I use fscanf, fprintf, fclose, fopen. They have to be implemented. { }

Explanation / Answer

#include /* Calculates cos(x) by using a Taylor approximation: cos(x) = x^0/(0!) - x^2/(2!) + x^4/(4!) - x^6/(6!) + x^8/(8!) - ... */ int main(void) { int k; // dummy variable k float x, // parameter of cos(x), in radians epsilon; // precision of cos(x) (cos = sum