Computer Science, asked by anshika22, 1 year ago

write a program that will store the height and radius of a cone in two separate variables. Calculate the volume and display the result


Anonymous: In which programming language?
anshika22: java

Answers

Answered by Anonymous
2
import java.util.Scanner;
class cone{
 public static void main(String [] args){
  Scanner ei=new Scanner(System.in);
  System.out.println("ENTER THE AREA OF BASE AND THE HEIGHT");
  double radius=ei.nextDouble();
  double height=ei.nextDouble();
  System.out.println("THE VOLUME OF THE CONE IS  "+(radius*radius*22/7)*height/3);
 }
}




Hope this helps,would be grateful if you mark this as the brainliest!
Similar questions