 # Programming - Minimum, maximum, sum and product for a matrix, in language C Anonymous

### Question Description

Pretending that the cosine function, cos(x) , is not available in the C compiler, create your own cos(x) using

 cos (x) = 1 - x22! + x44! - x66! + ¼

and demonstrate your program by making a table as:

 x mycos(x) cos(x) 0.0 1.000 1.000 0.1 1.101 1.105 0.2 1.308 1.221 ... ... ... 1.0 1.69 1.781

where mycos(x) is from your program and cos (x) is the C-supplied function in math.h.

Note:

1. The values above are false.
2. The following is the general form of cos (x).
 cos(x) = ¥åi=0 (-1)i x2 i(2 i)! ,
3. Take first 10 terms for the series.

Template:

 ```#include #include int factorial(int n) { (your code here) } float mycos(float x) { float sum=0; int i; for (i=0;i<=10;i++) sum = sum + (your code here); return sum; } int main() { int i=1; for (i=1;i< .......) printf(.......); return 0; } ``` This question has not been answered.

Create a free account to get help with this and any other question! Brown University

1271 Tutors California Institute of Technology

2131 Tutors Carnegie Mellon University

982 Tutors Columbia University

1256 Tutors Dartmouth University

2113 Tutors Emory University

2279 Tutors Harvard University

599 Tutors Massachusetts Institute of Technology

2319 Tutors New York University

1645 Tutors Notre Dam University

1911 Tutors Oklahoma University

2122 Tutors Pennsylvania State University

932 Tutors Princeton University

1211 Tutors Stanford University

983 Tutors University of California

1282 Tutors Oxford University

123 Tutors Yale University

2325 Tutors