Can someone help me with this problem?

I was given a problem to solve:

  1. Explain how do we combine multiple Boolean values? Write an if statement that outputs “Let’s go outside!” when both Boolean values are false. (boolean icyRain; boolean tornadoWarning;)

I am having a hard time with this, because I have entered the following code:

bool icyRain = false, tornadoWarning = false;

 if (icyRain && tornadoWarning == false) { Console.WriteLine("Let's Go Outside!"); } 

I am fairly new to C#, and for some reason this is stumping me. If someone could help me see the error in my ways, and show me the correct way, it'd be very appreciated. Thanks!

by AHopefulCynic via /r/csharp

Leave a Reply