Computer Science, asked by kamilmalik3074, 1 year ago

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
erivjeorijolk: ___k off moderators
erivjeorijolk: ___k off all moderators

Answers

Answered by parthomsarwade
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