Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Apprendre Défi : Déclaration de Variables à Type Explicite | Gestion des Types de Données
Bases de C#

bookDéfi : Déclaration de Variables à Type Explicite

  1. Déclarer une variable nommée bigValue de type unsigned long. L'initialiser avec la valeur 123456789.
  2. Déclarer une variable nommée smallValue de type integer. L'initialiser avec la valeur 1234.
main.cs

main.cs

copy
12345678910111213141516171819
using System.Drawing; using System; namespace ConsoleApp { internal class Program { static void Main(string[] args) { // Replace ___ with necessary data type ___ bigValue = 123456789; ___ smallValue = 1234; Console.WriteLine(bigValue); Console.WriteLine(smallValue); } } }
  1. Le mot-clé pour le type de données unsigned long est ulong.
main.cs

main.cs

copy
123456789101112131415161718
using System; namespace ConsoleApp { internal class Program { static void Main(string[] args) { // Replace ___ with necessary data type ulong bigValue = 1234567; int smallValue = 1234; Console.WriteLine(bigValue); Console.WriteLine(smallValue); } } }

Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 2. Chapitre 2

Demandez à l'IA

expand

Demandez à l'IA

ChatGPT

Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion

Suggested prompts:

What is the correct syntax to declare and initialize these variables in C#?

Can you explain the difference between `ulong` and `int` in C#?

Can you show an example of how to use these variables in a simple program?

Awesome!

Completion rate improved to 1.59

bookDéfi : Déclaration de Variables à Type Explicite

Glissez pour afficher le menu

  1. Déclarer une variable nommée bigValue de type unsigned long. L'initialiser avec la valeur 123456789.
  2. Déclarer une variable nommée smallValue de type integer. L'initialiser avec la valeur 1234.
main.cs

main.cs

copy
12345678910111213141516171819
using System.Drawing; using System; namespace ConsoleApp { internal class Program { static void Main(string[] args) { // Replace ___ with necessary data type ___ bigValue = 123456789; ___ smallValue = 1234; Console.WriteLine(bigValue); Console.WriteLine(smallValue); } } }
  1. Le mot-clé pour le type de données unsigned long est ulong.
main.cs

main.cs

copy
123456789101112131415161718
using System; namespace ConsoleApp { internal class Program { static void Main(string[] args) { // Replace ___ with necessary data type ulong bigValue = 1234567; int smallValue = 1234; Console.WriteLine(bigValue); Console.WriteLine(smallValue); } } }

Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 2. Chapitre 2
some-alt