ESC 251 HW 8 Due: Sep. 20

1)
(1 pts) Write a program that declares a to be a double precision variable, then performs the assigment
```    a = SIN(5)
```
then prints out the value of a. What happens when you do this?
2)
(2 pts) Modify the first program so that it also declares b to be double precision, then assigns
```    a = SIN(3.0)
b = SIN(3.0d0)
```
Have your program print out the resulting values of a and b. Are these the same? If not, which one is correct (according to the guidelines we have established in class)?
3)
(2 pts) Write a program that will accept an angle in degrees and compute the sine, cosine and tangent of the angle. Test your program for an angle of 30 degrees and an angle of 210 degrees.
4)
(2 pts) Extend your program from Problem 3 by having it compute the appropriate inverse trig functions on the answers from Problem 3. You should get the angle you started with. Why is this not always the case?
5)
A conical frustum is created by taking a cone of height H and base radius r1, slicing it at a height where the radius is r2 and keeping the bottom part (think of the stool that the elephants stand on at the circus).
a)
(2 pts) Derive a formula for the volume of a conical frustum given the values of H, r1 and r2 and show your work. Note that this does not mean "write down the formula from the Wikipedia page."
b)
(6 pts) Write an F90 program that will compute the volume of a conical frustum given the values of h, r1 and r2. Test your program for the values H = 3.2, r1 = 1.1 and r2 = 0.5.
NOTE: Most students historically get this problem wrong. Draw a sketch of the figures described above and indicate where H, r1 and r2 are.