+ 4
[Challenge] Calculate the volume of a cone
Calculate the volume of a cone with a user given radius of the base and height. Easy peasy! Any language you want, here is mine in c++ https://code.sololearn.com/cl3o5nlDQPOr/?ref=app
4 Réponses
+ 15
System.out.print (3.14*Math.pow(r,3)*h);
+ 6
JavaScript one liner:
https://code.sololearn.com/WdJzALLjopFc/?ref=app
+ 4
in python
from math import pi
r=int(input())
h=int(input())
print(pi*r*r*h/3)