StatethevalueofxafterthestatementifP(x)thenx:=1
b)x=1.
a)x=0.
isexecuted,whereP(x)isthestatement“x>1,”ifthe
valueofxwhenthisstatementisreachedis
c)x=2.
Let us state the value of after the statement
if then ,
where in the following cases:
a) If the statemet that is is false, and hence after the command if then the value of is equal to 0.
b) If the statemet that is is false, and hence after the command if then the value of is equal to 1.
c) If the statemet that is is true, and hence after the command if then the value of is equal to 1.
Comments
Leave a comment