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

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 false.

in progress 0
Thanh Thu 5 years 2021-09-03T10:53:49+00:00 1 Answers 10 views 0

Answers ( )

    0
    2021-09-03T10:55:12+00:00

    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.

Leave an answer

Browse

Giải phương trình 1 ẩn: x + 2 - 2(x + 1) = -x . Hỏi x = ? ( )