Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
This.Don't edit your original post after the fact. The benefit of the forum is that everyone is able to read the contributions of others. If you edit your posts you are depriving the contributors the benefits you derived from it, essentially taking out without contributing. Don't do that.
You're getting closer. I bet if you work out the flow on a whiteboard for the 3 items in the array against the "result" variable, you'll see where things are slightly jumbled.Still a bit cloudy.
count = InputBox("Enter the amount of numbers you want to add", , "Enter")
ReDim myarray(count-1)
'Dim x As Integer
For count As Integer = 0 To myarray.Length - 1
myarray(count) = InputBox("Please enter a value for position " & count, "myArray")
Next
Response.Write(myarray.Length & "<br />")
Response.Write(myarray(0) & "<br />")
Response.Write(myarray(1) & "<br />")
For count As Integer = myarray.Length - 1 To 0 To Step -1
result = myarray(count) - result
Next
Response.Write("The sum of the values is " & result)
End Sub
The main point was for the OP to actually read the suggestions posted, and take one more step on his/her own down the direction being pointed.For something this trivial I don't think I revealed anything other than showing how to count the array properly and stepping backwards through it.
Honestly he wasn't all that close but I didn't see the first posts.