WAP to calculate the area of triangle and volume of cylinder in java by public static void main function and both should be printed together
Answers
Answered by
6
Explanation:
class vol
{
void volume(int s)
{
int vc=s*s*s;
System.out.println(“The Volume of a Cube is”+vc);
}
void volume(double r)
{
double vs=(4/3.0)*3.15*r*r*r;
System.out.println(“The Volume of Sphere is”+vs);
}
void volume(int l, int b, int h)
{
int vcd=l*b*h;
System.out.println(“The Volume of a Cuboid is”+vcd);
}
}
Similar questions
Physics,
29 days ago
Social Sciences,
29 days ago
Social Sciences,
1 month ago
Hindi,
1 month ago
Hindi,
9 months ago
Math,
9 months ago