+ 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

1st Feb 2018, 5:55 PM
Ares Koliadimas
Ares Koliadimas - avatar
4 Respuestas
+ 15
System.out.print (3.14*Math.pow(r,3)*h);
2nd Feb 2018, 8:39 AM
Gaurav Agrawal
Gaurav Agrawal - avatar
1st Feb 2018, 6:17 PM
DAB
DAB - avatar
+ 4
in python from math import pi r=int(input()) h=int(input()) print(pi*r*r*h/3)
1st Feb 2018, 6:05 PM
michal