vb立即窗口中的问题 答案为什么是false 这句话(not p or k and p or x>y)怎么理解?

vb立即窗口中的问题 答案为什么是false 这句话(not p or k and p or x>y)怎么理解?
x= 2:y=30:p=true:k=false
(或print)not p or k and p or x>y
false
紫轩亭 1年前 已收到1个回答 举报

cyu6666 幼苗

共回答了19个问题采纳率:89.5% 举报

优先级:not>and>or
所以not p or k and p or x>y即((not p) or k)and(p or (x>y))
not p=false
(not p)or k=false
x>y=false
p or x>y=true
((not p) or k)and(p or (x>y))=false and true=false

1年前

9
可能相似的问题
Copyright © 2024 YULUCN.COM - 雨露学习互助 - 16 q. 0.015 s. - webmaster@yulucn.com