Ask Question

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);

+3
Answers (1)
  1. 6 January, 13:45
    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?
Find 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 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