Hola,
Your code actually works okay as long as you enter a number for each input. It's a little confusing because there are no prompts for each number in the set, just a blank line. If you happen to press [ENTER] instead of entering a number at any point, you'll get lots of errors.
You will want to change your code to test every input made by the user to see if it is a valid number, and only add it to the set if so. If it is a bad input, loop around and ask again.
In reply to Re: Set operations
by Loops
in thread Set operations
by Panfi96
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |