+ 10
Challenge (6)
Make a program in HTML which can calculate cube root of a give number.
35 Answers
+ 21
<script>for(;;){alert(Math.cbrt(prompt("Num")));}</script>
+ 9
var a =parseInt(prompt("Enter"));
var n = Math.pow(a, 1/3);
alert (n)
+ 9
@Terminator : not 1/4 ,it should be 1/3
+ 9
https://code.sololearn.com/WGL8kl3B6vf2/?ref=app
This Is My Code But Mark Nikhil's Answer as Best
+ 9
Mark Nikhil's Answer as Best 😊
+ 9
@Ekansh :- It was solved with the very first answer by ValentinHacker...There is a problem with your code playground i guess
+ 9
Congratulations for badge
+ 8
document.write(Math.pow(prompt("Number please"),1/3));
+ 8
Ekansh :- What is the cube root of 27?
+ 8
@Ekansh :- Write 27 in Valentin's and my code you will get 3
+ 8
Let me try input tag
+ 8
Its not public
Now see
+ 7
@ValentinHacker's code is also fully right..I think u should mark it best ..But Valentin after running your code nobody can go back from Code Playground ...Its like a death zone
+ 7
Ekansh you got the answer to this?
+ 6
Yes it is @Ekansh ...Copy it in JavaScript and then see
+ 5
@nik 3
+ 5
@Terminator it's not asking for no. please try it yourself
+ 4
I want cube root not cube
+ 4
@Nikhil code is not working