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

Kursusindhold

C# Basics

C# Basics

1. Getting Started
2. Dealing with Data Types
3. Control Structures
4. Loops
5. Arrays
6. Methods

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

Var alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 3. Kapitel 3
Vi beklager, at noget gik galt. Hvad skete der?
some-alt