如何检查IF语句的多种可能的组合?
因此,我有20个条件,我试图检查不同的组合。
例如:
1和2或3 1或2或3和4 4和5或2 4和5和2或9 Ect ....
我想弄清楚我该怎么办。尽管我可能会使用Swich Case,但是在这样的情况下,我不确定如何做到这一点。
我否需要检查所有可能的选项,但我想尝试至少15-20“和“”或“组合”。
会喜欢这里的一些建议! :)
So I have 20 conditions and im trying to check different combinations.
for example:
1 and 2 or 3
1 or 2 or 3 and 4
4 and 5 or 2
4 and 5 and 2 or 9
ect....
I'm trying to figure out what should I do. I though maybe use a swich case but I'm not really sure how to do that in a case like that with so many options.
I dont need to check All the possible options but i would like to try at least 15-20 "and " " or" combinations.
would love some advice here!
:)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这应该为您提供所有组合:
This should give you all combinations: