Write a java program to calculate the total surface area, curved surface area and volume of cylinder(formula:- (TSA=2πr(r+h),CSA=2πrh,volume =πr2h))
Answers
Answered by
4
class Cylinder
{ public void calc(double r,double h)
double tsa=2.0*3.14*r*(r+h);
System.out.println("Total surface area ="+tsa);
double csa=2.0*3.14*r*h;
System.out.println("Curved surface area ="+csa);
double vol=3.14*r*r*h;
System.out.println("Volume="+vol);
}
Similar questions
Social Sciences,
7 months ago
Social Sciences,
7 months ago
Social Sciences,
7 months ago
Hindi,
1 year ago
English,
1 year ago
Math,
1 year ago