Can any one tell why the code below is not asking me the details.....???? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

Can any one tell why the code below is not asking me the details.....????

https://code.sololearn.com/Wi0yfnoVEhV9/?ref=app

24th Aug 2017, 1:47 PM
A N S H U L S I N G H
A N S H U L   S I N G H - avatar
4 Answers
+ 7
what ''not asking me the details'' mean ? please explain, maybe i can help you.
24th Aug 2017, 2:02 PM
Amethyst Animion
Amethyst Animion - avatar
+ 2
???Maybe, You should use 'prompt' function to receive user's input.
24th Aug 2017, 2:07 PM
ushumpei
ushumpei - avatar
+ 2
<script> var a,b,c,d,e,f,g; a=parseInt(window.prompt("Input First Number: ")); b=parseInt(window.prompt("Input Second Number: ")); c=parseInt(window.prompt("Input Third Number: ")); d=parseInt(window.prompt("Input Fourt Number: ")); e=parseInt(window.prompt("Input Fith Number: ")); f=a+b+c+d+e; g=f/100; alert("The total marks is"+f); alert("The total percentage is " +g); </script> https://code.sololearn.com/WoRc35u2NNLN/#html
24th Aug 2017, 2:08 PM
AgentSmith
+ 1
Yup. For some reason you're trying to parse a bunch of strings to int, and I'm guessing you're assuming parseInt means "give me user input?"
24th Aug 2017, 2:03 PM
AgentSmith