![]() |
|
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Newbie
Join Date: Oct 2006
Posts: 19
Rep Power: 0
![]() |
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)
Dim a As Double
For i = 1 To n
a = n * i
Next
Return a
End FunctionThanks. |
|
|
|
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| CGI Script - change product display | jess | Perl | 3 | Jul 12th, 2006 5:25 PM |
| Median/Mode in arrays? {Need help} | Java|Tera | Java | 27 | Nov 29th, 2005 10:50 AM |
| Reading in multiple numbers | wingz198 | C++ | 2 | Oct 14th, 2005 1:45 PM |
| Prime Numbers | Konnor | C++ | 6 | Sep 12th, 2005 6:46 PM |
| Assignment of numbers to variables without asking | Haz | C# | 26 | May 23rd, 2005 10:30 AM |