Thursday, November 14, 2013

IF-THEN-ELSE

In computer science, conditional statements are constructs that perform different actions depending on whether a programmer-specified condition is true or false. Although the specific syntax or statement format varies a bit among different computer languages, the basic form looks as follows:

IF (condition = true) THEN
(execute this series of steps)
ELSE
(execute this different series of steps)
END IF

There are no surprises, no gnashing of teeth, no questioning, and no drama when the condition is tested to be true. In such a case you can know with 100% certainty what will happen. If the condition is tested to be false, then too you know with 100% certainty what will happen without fail. Let's consider a specific example.
So, knowing this, tell me why you are surprised every time we end up at point B?