Question: Write C programs for the following: 1. Pretending that the cosine function, cos( x ) , is not available in the C compiler, create your
Write C programs for the following:1. Pretending that the cosine function, cos(x) , is not available in the C compiler, create your own cos(x) using
|
Backgroundand 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:
The values above are false.
The following is the general form of cos (x).
|
Take first 10 terms for the series.
Template:
#include |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
