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
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
using System;
namespace ConsoleApp
{
class Program
{
static void Main(string[] args)
{
int valueA = 7;
int valueB = 5;
Console.WriteLine(___);
}
}
}
123456789101112131415using 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
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
using System;
namespace ConsoleApp
{
class Program
{
static void Main(string[] args)
{
int valueA = 7;
int valueB = 5;
Console.WriteLine(valueA >= 7 && valueB <= 5);
}
}
}
123456789101112131415using System; namespace ConsoleApp { class Program { static void Main(string[] args) { int valueA = 7; int valueB = 5; Console.WriteLine(valueA >= 7 && valueB <= 5); } } }
Tutto è chiaro?
Grazie per i tuoi commenti!
Sezione 3. Capitolo 3
Chieda ad AI
Chieda pure quello che desidera o provi una delle domande suggerite per iniziare la nostra conversazione