Ask Question

Look at each of the following code segments. What value will the If ... Then ... Else statements store in the variable intY?

a. intX = 0If intX < 1 ThenintY = 99Else intY = 0End Ifb. intX = 100If intX < = 1 ThenintY = 99ElseintY = 0End Ifc. intX = 0If intX 1 ThenintY = 99Else intY = 0End If

+4
Answers (1)
  1. 10 September, 18:29
    0
    a. Y=99

    b. Y=0

    c. Y=99

    Explanation:

    There are 3 if Then else statements

    for a.

    X=0 it is less than 0 hence if will be executed so Y=99.

    for b.

    X=100 since X is not less than or equal to 1 so else will be executed Y will be 0.

    For c.

    X=0 since it is not equal to 1 hence if will be executed hence the answer is Y=99.

    The operator is for not equal to.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Look at each of the following code segments. What value will the If ... Then ... Else statements store in the variable intY? a. intX = 0If ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers