import java.util.Scanner; public class MyClass { public static void main(String args[]) { Scanner s= new Scanner(System.in); double r=s.nextDouble(); System.out.println("Enter the radius of cone:="+r); double h=s.nextDouble(); System.out.println("Enter the height of cone:="+h); double volume=(22*r*r*h)/(3*7); System.out.println("Volume Of Cone is:" +volume); } }
Interactive mode :
OFF ON

Stdin Inputs...
Result...
compiled and executed in {{this.executionTime}} second(s)

								
Online execution powered by JDoodle.com
{{this.setLanguage("java", "",".java",true, 0)}}