1. ## Multiple outcomes of addition using any number in textbox

Trying to figure out the filtering for my code so far to exclude repeating adding numbers to given number in textbox. Here's a picture of my project. Any help is welcome, thanks in advance.

2. ## Re: Multiple outcomes of addition using any number in textbox

One simple way is to have the numbers in a list and remove them from the list as you use them so they are no longer available as a choice.

3. ## Re: Multiple outcomes of addition using any number in textbox

Originally Posted by DataMiser
One simple way is to have the numbers in a list and remove them from the list as you use them so they are no longer available as a choice.
I'm using a listbox as you can see. Is just that my code is too long so I'm looking for options here to code something simple. Thanks anyways.

4. ## Re: Multiple outcomes of addition using any number in textbox

I was talking about a list for the source numbers but I am not really sure what you mean by repeating. Should for example 1 only be used 1 time or 1 time per addition as shown in your list.

Based on your first post I assumed the output you show is not what you want but now am not so sure. If you are asking how to shorten your code you would first have to show your code

5. ## Re: Multiple outcomes of addition using any number in textbox

Well, I see you are not following the same 'rules' (sketchy as they were) on your other thread. You said that you want to see the 3 numbers in ANY order...now you want to DELETE them? Don't put them in there in the first place.

Also, IF you still want 3 numbers in ANY order, you are also missing some (my code I offered before also missed several when I was thinking 3 numbers, but in only one order) Like 2 + 1 + 9, 3 + 1 + 8, 3 + 2 + 7, etc....see the repeating pattern there But that should be a moot point if you don't want any 3 sets repeated.

6. ## Re: Multiple outcomes of addition using any number in textbox

Originally Posted by SamOscarBrown
Well, I see you are not following the same 'rules' (sketchy as they were) on your other thread. You said that you want to see the 3 numbers in ANY order...now you want to DELETE them? Don't put them in there in the first place.

Also, IF you still want 3 numbers in ANY order, you are also missing some (my code I offered before also missed several when I was thinking 3 numbers, but in only one order) Like 2 + 1 + 9, 3 + 1 + 8, 3 + 2 + 7, etc....see the repeating pattern there But that should be a moot point if you don't want any 3 sets repeated.

What I meant is not to repeat in any order same digits and repeat same digit in any addition. I've been trying to figure it out last night but still can't. I just need someone would share some useful information code to filter this out.

7. ## Re: Multiple outcomes of addition using any number in textbox

You don't need any code to filter anything out. You can write the code using nested for loops and the right "from" and "to" logic that will ensure these duplicates aren't possible.

EXACTLY!!!!

9. ## Re: Multiple outcomes of addition using any number in textbox

To post your code, COPY all the code into Memory (select all of it from your program and use CNTRL-C).

Then, click on the "#" icon above (the icon right of the VE icon). Insert your mouse after "QUOTE]" and before "[/QUOTE".
Then paste with CTRL-P.

10. ## Re: Multiple outcomes of addition using any number in textbox

When it comes to assisting with homework, I (and most others here) will rarely provide usable code. It is your assignment, giving you code is akin to giving you solutions to a math assignment.

I took a high school programming class. For one assignment that I had completed, one of my friends was struggling with it. So I gave them my code. And, unbeknownst to me, they gave it to others who gave it to others, etc. In the end, about 16 people turned in essentially the same code (some were "smart" enough to at least change variable names, lol), and all of us that turned in that code got a zero on the assignment. So I did the work legit, tried to be "nice", and got bit for it.

So I'm more than happy to provide guidance, ideas, or feedback on code. But I'll never write the code for you.

Good luck.