Please, write the program in C++ language. Also, include a screen shot for the output as well as the output itself. More info. can find in attached. Thanks
Objective: Become familiar with basic File Output, simple functions, and
mathematical operations.
Program Description: Your program is to use functions to perform the
following operations.
1. Part 0: Output standard Header
Put all of your standard output information into a function named
ShowHeader() (that writes to a file).
2. Part 1: Simple Function Table
Write a function to generate a table of f(n) for the following functions:
sqrt(x) (x”, n = 1/2), square(x) (x”, n = 2), and exp(x). The range
of x should be 0 to 10 in steps of 1, 10 to 50 in steps of 5. All output
must be in one table. Note: sqrt() and exp() are part of the math
library, square() is not, so you will need to define it.
25
27
=
3. Part 2: Trigonometric Function Table
Generate a table of sin(x) and its polynomial approximation, as given
by
23
sin(2)
+
+ …
3! 5!
using four terms (as above) and ten terms. The general form of the
polynomial is:
– 19
sin(-1) = ☺
2n+1
(2n + 1)!
7!
N
ne
where, N, is one less than the number of terms in the polynomial. The
range of x should be 0 to 15 degrees in 1 degree increments and 15 to
45 degrees in 5 degree increments. Note: Only one loop may be used.
Deliverables:
• Program-fully documented.
• Output-Neatly formatted and documented. All output is to be
written to a file.
• Program design sheet-In addition to your program and the output,
attach a page showing a rough design of your program.
Sample calculations for part 1–Neatly formatted and documented.
This must be on a separate sheet that is attached to this assignment.
Note: Your program design and sample calculations should be done before
you start programming.
Suggestion: Develop your program piecewise. For example, make sure you
can write your header to a file, then move to the next part, etc.