[x]Register Now
Check out our brand new Local Poker Communities! Get updates and interact with poker players in your area.
Visit the United States Poker Community | Visit the California Poker Community | Read more about the Launch of P5s Local
Visit the United States Poker Community | Visit the California Poker Community | Read more about the Launch of P5s Local
-
Hi,
I'm looking for help coming up with an array multiplication program that will:
1. allow the user to define the size of the array (number of rows and columns)
2. multiply the elements such that only one element from each row is multiplied w/only one element in each of the other rows (ex. a 2x2 array gives output for a1*b1 and a1 * b2 and a2 * b1 and a2 * b2)
3. allow the user to define upper and lower bounds for the above product
4. output combinations that fall within these bounds.
If there are any programmers out there that would be interested in helping me please pm. I am somewhat familiar w/visual basic (wrote 1000's of lines of code in the distant past) so that might be a plus in terms of conversing.
Thanks,
Niels -
-
it sounds like you need a multiplication array with a conditional if statement. my assumption is you are using excel since you mentioned vba?
-
-
it's been years aince I used VB but this is a simple problem. Off the top of my head you initiate the 2 arrays dynamically after the user enters the size ( = new in java). Then just use 2 for loops to multiply the elements. Store the bounds in global variables and use if statements to check if the products are within range.
devshed forums > OT for programming advice btw -
Pretty poor style and you'd never really do it like this and bother storing in the arrays to begin with in the real world, but something like this I guess https://gist.github.com/879767
I made some assumptions but you should be able to modify to suit:
array dimensions are square
numbers are integers
lower and upper bounds are exclusive










