Purpose: To use a defined constant. To write simple assignment statement. To declare variables. To code basic math expressions.
NOTE: Advanced students: Do NOT write or use a function.
Using assignment statements write a program which:
1.Creates identifiers (variables) called radius, area, length, width, height, volume.
2.Assigns the value of 2.5 to the variable radius.
3.Uses an expression to find the area of a circle. A = PI R^2
4.MEANINGFULLY prints the area of the circle with radius 2.5.
5.Assigns the value of 3 to length.
6.Assigns the value of 4 to width.
7.Uses an expression to find the area of a rectangle. A = lw
8.MEANINGFULLY prints the area of that rectangle.
9.Assigns the value of 5 to height.
10.Uses an expression to find the volume of a box. V = lwh
11.MEANINGFULLY prints the area of that box.
The program shall use a DEFINED constant (3.14159) for PI. (Refer to your class notes or look up the information).