Ask Question
22 January, 11:46

What is printed by the following program? var isRaining = false; var isCloudy = false; var isSunny = ! isRaining &&! isCloudy; var isSummer = false; var isWarm = isSunny || isSummer; println ("Is it warm: " + isWarm);

+4
Answers (1)
  1. 22 January, 14:08
    0
    The output to this given question is "Is it warm: true".

    Explanation:

    In this question firstly two-variable defines that are isRaining and isCloudy. In those variables assign false value. Then we define another variable that is isSunny. In isSunny variable, we check condition that is if variable isRaining not AND (logical gate) variable isCloudy not equal to isSunny. The AND logical gate is used to check that both condition is true or not. Then we define another variable that is isWarm. In this variable, we check condition if isSunny OR (logical operator) isSummer is true. The OR operator is used to check in both value if one condition will true it will print true. At the last will print the value.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “What is printed by the following program? var isRaining = false; var isCloudy = false; var isSunny = ! isRaining &&! isCloudy; var isSummer ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers