Answer to Question #278801 in Discrete Mathematics for Saif ur rehman

Question #278801

. What is the value of x after each of these statements is encountered in a computer program, if x = 1 before the statement is reached? a) if x + 2 = 3 then x := x + 1


1
Expert's answer
2021-12-19T15:38:11-0500

if x+2=3 then x:=x+1;

Ans-

x+2=3

1+2=3

3=3  so x:=1+1;

x:=2;


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS