I tried to look for it, but now I do not know how to correctly formulate the question ...
I have if-statementwith many logical operators. How do I make this easier?
If (n == 1 ||n == 2 ||n == 3 ||n == 5 ||n == 9 ||n == 8 ||n == 7 ||n == 551 ||n == 17 ||n == 81 || etc etc)
{ //Stuff
}
I think in pseudocode I want something like this:
List list = {1, 3, 5, 7, 9, 12, 14, 16, 18, 19, 21, 23, 25, 27, 30, 32, 34, or 36 }
if n is in list, then {}
As you know, I am a beginner, and I have problems with the wording of what I need.
source
share