Share
The ______ clause in an if statement allows a program to make one choice if the condition is true, and anothere choice if the condition is f
Question
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Answers ( )
Answer: The IF clause.
Explanation: This is the IF clause; you can use it as:
IF (something = true) then “something happens”
else “other thing happens”
Some example of it can be, suppose that your program reads a number X that the user inputs, then you can do:
If ( X > 5) then
print: “the number X is bigger than five”
Else
print: “the number X is smaller than five”
Where, of course, the statements depend on the language used, but the “if” clause works almost the same in every language.