Find and display the values of both sides of the following mathematical series expression and
an absolute difference of both sides. User can input either of angles in degree 90, 60, 30 etc.
sin(x) = x −
x
3
3!
+
x
5
5!
−
x
7
7!
+
x
9
9!
Once the user enters the angle in degrees. Your program should do the following (Write separate
functions for a, b, c, and d)
a) LHS Result
b) RHS Result
c) Difference
d) First term, series of two terms, series of three terms, series of four terms, series of five terms.
Machine Problem: The National Earthquake Information Center has asked you to write
a program implementing the following decision table
to characterize an earthquake based on its Richter scale number:
Richter Scale Number (n) Characterization
n < 5.0 Little or no damage
5.0 <= n < 5.5 Some damage
5.5 <= n < 6.5 Some damage; walls may crack or fall
6.5 <= n < 7.5 Disaster: houses and buildings may collapse
higher Catastrophe: Most buildings destroye
Can you share a concept of a function?
Read through this program carefully and try to analyze what is going on in each line of code (each line of code is performing more than one task).