What does !
mean in pseudo-code? I know !
stands for factorial but I can't translate it .
ex:
get operation
if (operation!= ’B’ OR operation != ’D’ OR operation!= ’W’) then
print "Invalid Operation"
What does it mean?
What does !
mean in pseudo-code? I know !
stands for factorial but I can't translate it .
ex:
get operation
if (operation!= ’B’ OR operation != ’D’ OR operation!= ’W’) then
print "Invalid Operation"
What does it mean?
!=
表示不相等,!
一般表示不或否定。
它的意思是“不”。所以你的示例代码
if (operation!= ’B’ OR operation != ’D’ OR operation!= ’W’)
可以读作
“如果操作不等于'B'或操作不等于'D'或操作不等于'W'”
一般来说, _
!
手段 不是
||
手段logical
或
&&
手段logical
和
例子:
!false == true ( == means equality )