Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何使用和“或”或你会怎么称呼它
喜欢:
if (n1 'or' n2 'or' n3 'or' n4 'or' n5 == 1){ }
Objective-C中“或”的符号是“||” 所以你的陈述看起来像:
if((n1==1) || (n2==1) || (n3==1) || (n4==1) || (n5 == 1)) { // do something }