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?
Answers
Answered by
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!
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