当条件为5<x<10时,x=x+1,以下语句正确的是( )。

admin2020-10-14  9

问题 当条件为5<x<10时,x=x+1,以下语句正确的是(    )。

选项 A、if 5<x<10 then x=x+1
B、if 5<x or x<10 then x=x+1
C、if 5<x and x<10 then x=x+1
D、if 5<x xor x<10 then x=x+1

答案C

解析 条件5<x<10即为x大于5小于10,用关系表达式表示就是x>5 and x<10。
转载请注明原文地址:https://kaotiyun.com/show/gicp777K
0

最新回复(0)