
Develop the program calculateCylinderArea, which accepts radius of the cylinder's base disk and its height and computes surface area of the cylinder.

Hello Friend,
Try the following code:
import java.util.*;
class CalculateCylinderArea
{
public static void main(String[] args)
{
double pi=3.14;
Scanner input=new Scanner(System.in);
System.out.print("Enter Radius: ");
double r=input.nextDouble();
System.out.print("Enter Height: ");
double h=input.nextDouble();
double v1=2*pi*r*r;
double v2=2*pi*r*h;
double surfaceArea=v1+v2;
System.out.println("Surface Area of Cylinder: "+surfaceArea);
}
}
Thanks
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.