Write a Java expression to accept radius, height, from the user to calculate and display:
1. The diameter of a circle: 2×radius
2. The circumference of a circle: 2πr
3. Area of a circle: πr²
4. Surface Area of a cylinder: 2πrh+2πr²
5. Volume of a cylinder: πr²h
Answers
Answered by
1
Answer:
1. Diameter of a Circle = 2r = 2 * radius
2. Area of a circle is: A = πr² = π * radius * radius
3. Circumference of a Circle = 2πr = 2 * π * radius5. The Volume of a Cylinder is Volume of a Cylinder = πr²h
Volume of a Cylinder = Math.PI * radius * radius * height
Volume of a Cylinder = 3.14 * 4 * 4 * 6
Volume of a Cylinder = 301.44
4. The Lateral Surface Area of a Cylinder is
LSA = 2πrh
LSA = 2 * Math.PI * radius * height
LSA = 2 * 3.14 * 4 * 6
LSA = 150.72
Surface Area of a Cylinder= 2πr² + 2πrh
It can also be written as
Surface Area of a Cylinder = 2πr (r+h)
Surface Area of a Cylinder = 2 * Math.PI * radius * (radius + height)
Surface Area of a Cylinder = 2 * 3.14 * 4 * (4 + 6)
Surface Area of a Cylinder = 251.2
Similar questions