Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Apprendre Challenge: String Formatting | Gestion des Types de Données
Bases de C#

bookChallenge: String Formatting

Tâche

Swipe to start coding

Your challenge is to practice declaring variables and formatting strings in C#.

  • Declare a string variable named name and assign Alice.
  • Declare an integer variable named age and assign 20.
  • Print a sentence that uses both variables, formatted like this: Hello, my name is Alice and I am 20 years old.
  • Use string formatting to combine the variables and text in the output.

Solution

Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 2. Chapitre 12
single

single

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

close

bookChallenge: String Formatting

Glissez pour afficher le menu

Tâche

Swipe to start coding

Your challenge is to practice declaring variables and formatting strings in C#.

  • Declare a string variable named name and assign Alice.
  • Declare an integer variable named age and assign 20.
  • Print a sentence that uses both variables, formatted like this: Hello, my name is Alice and I am 20 years old.
  • Use string formatting to combine the variables and text in the output.

Solution

Switch to desktopPassez à un bureau pour une pratique réelleContinuez d'où vous êtes en utilisant l'une des options ci-dessous
Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 2. Chapitre 12
single

single

some-alt