Main Task
- The formula for the volume of a cylinder is πr2h
- The formula for the surface area is (2πr2) + (2πrh)
- Create a program that will:
- Ask for the radius and height of a cylinder
- Calculate the volume and surface area
- Output the values separately
- Save and label your code
Extension Task
- Create a similar program that will:
- Ask for the length, width and height of a cuboid
- Calculate the volume and surface area
- Output the values separately
- Save and label your code
Hints
- Assume the user will enter numbers with decimal points
- Create an answer variable to store the result before printing
- pi (π) = 3.14159265359
- r2 is the same as r*r