![]() |
Help - Get the product of the numbers between 1 and n?
How can I change this code to get the product of the numbers between 1 and a variable n. Here's the code, and I can just get the n's square.
:
Function product(ByVal n As Double, ByRef i As Double)Thanks. |
well, right now you are reseting the varible "a" to a new number everytime your loop runs.
you need to add the value to a, here's how i would do it. :
Function product(ByVal n As Double, ByRef i As Double)not sure if that's what you are looking for. Also, this looks like homework....please don't let it be homework, mainly because posting homework questions is against the forum rules. |
thanks
Thanks, no, it's for myself. I'm trying to learn vb from an old book, but I didn't know what to do.
|
ah ok, cool...for i minute there i thought i was doing your homework (we get a lot of people trying to get us to do home work questions).
|
| All times are GMT -5. The time now is 1:38 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC