Thread
:
code to write out combinations e.g. (10 choose 3)
View Single Post
#
3
(
permalink
)
02-03-2008, 03:01 PM
derez
Senior Member
Join Date: May 2007
Posts: 188
Awards Showcase
Total Awards
: 2
combination
Here is conceptual code, not debugged:
sub combination(x,y)
a = 1
for i = 1 to x
a = a*i
next
b = 1
for i = 1 to y
b=b*i
next
c=1
for i = 1 to x-y
c= c*i
next
return a/(b*c)
end sub
__________________
David Erez
Ramat Hasharon, Israel
derez
View Public Profile
Send a private message to derez
Find all posts by derez