Ask Question
2 April, 15:26

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

+2
Answers (1)
  1. 2 April, 17:48
    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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers