Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Impara Challenge: Operators | Control Structures
C# Basics

book
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.

cs

main

copy
using System;

namespace ConsoleApp
{
class Program
{
static void Main(string[] args)
{
int valueA = 7;
int valueB = 5;

Console.WriteLine(___);
}
}
}
123456789101112131415
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.

cs

main

copy
using System;

namespace ConsoleApp
{
class Program
{
static void Main(string[] args)
{
int valueA = 7;
int valueB = 5;

Console.WriteLine(valueA >= 7 && valueB <= 5);
}
}
}
123456789101112131415
using System; namespace ConsoleApp { class Program { static void Main(string[] args) { int valueA = 7; int valueB = 5; Console.WriteLine(valueA >= 7 && valueB <= 5); } } }

Tutto è chiaro?

Come possiamo migliorarlo?

Grazie per i tuoi commenti!

Sezione 3. Capitolo 3

Chieda ad AI

expand
ChatGPT

Chieda pure quello che desidera o provi una delle domande suggerite per iniziare la nostra conversazione

some-alt