0
What is coding to count no.of +ve and -ve no. entered by user like user will enter different numbers in prompt box,0 to stop.
JAVASCRIPT
35 ответов
+ 4
yes. it will be fine
+ 7
Can you try explaining your request in another way, I do not understand what you mean
+ 7
give me a bit to type an example. I am out at the shops at the moment. But now that you have explained it better, some one should be able to help you
+ 7
This may help you.
https://www.w3schools.com/js/js_popup.asp
You will want to use a prompt box to get user input inside a loop which checks the user input upon each iteration. If user input equal 0 exit loop else Use an alert box to display user input
+ 7
;) Sorry I got confused, I thought you just wanted an idea of how to do it.
+ 7
give me a bit and I will create a code to show how to do it with input boxes and loops
+ 6
? It tells you how to create input prompts and alert prompts
+ 6
it does, until user enters a 0, it will keep on asking. This should be enough for you to get a start. Adding and subtracting entered values should be a simple matter from here
+ 5
oh.
+ 5
ohh, well that should be an easy task now too, just include an if statement inside the loop to check whether user is negative or positive
+ 5
you're welcome! did you need me to explain how to works?
+ 5
anytime!
+ 5
I would prefer you do not as I am only one person, and only have so much knowledge. You are much better to ask here so many eyes can see it. More eyes equal more brains and a better quality answer.
+ 5
because we check inputs value straight after we declare the variable. we could just use var input; and it would still work fine (when first checked inputs value would be null) but I am a little pedantic
+ 2
after entering different values when user enter 0 then a message will appears you have entered .. positive and ... negative numbers
+ 2
I am confused how to do this
+ 2
just give me any idea
+ 2
no it should keep record of each value and keep on showing prompt box untill user enter zero.When user enter 0 then will show that "you have entered n positive and z negative numbers