Course Content
C# Basics
C# Basics
2. Dealing with Data Types
Challenge: Operators
In the Console.WriteLine
statement, write a boolean (logical) expression which outputs true
only if valueA
is greater or equal to 7 and valueB
is less or equal to 5
.
main
using System; namespace ConsoleApp { class Program { static void Main(string[] args) { int valueA = 7; int valueB = 5; Console.WriteLine(___); } } }
You can use the &&
operator to join two conditions.
main
using System; namespace ConsoleApp { class Program { static void Main(string[] args) { int valueA = 7; int valueB = 5; Console.WriteLine(valueA >= 7 && valueB <= 5); } } }
Everything was clear?
Thanks for your feedback!
Section 3. Chapter 3