Write the program took calculate the volume of a cylinder. the program should get the value for height of the cylinder and the radious of its base from the user through INPUT statement
Anonymous:
___k off
Answers
Answered by
3
import java.util.*;
class p1
{
public static void main();
{Scanner sc=new Scannen(System.in);
int r,h;
double vol;
System.out.println("enter the radius and height of cylinder");
r=sc.nextInt();
h=sc.nextInt();
vol=22/7*r*r*h;
System.out.println("volume of cylinder="+vol);
}
}
Similar questions
Social Sciences,
7 months ago
Math,
7 months ago
Social Sciences,
1 year ago
English,
1 year ago
Hindi,
1 year ago