Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Apprendre Challenge: else Keyword | Structures de Contrôle
Practice
Projects
Quizzes & Challenges
Quizzes
Challenges
/
Bases de C#

book Challenge: else Keyword

Tâche

Swipe to start coding

  • Declare an integer variable age to store the user’s age.
  • Declare a boolean variable isMember to indicate if the user is a member.
  • Use an if-else statement to check the following conditions:
    • If the user is 65 or older or isMember is true, print: Eligible for discount
    • Otherwise, print: Not eligible for discount

Solution

Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 3. Chapitre 11
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

book Challenge: else Keyword

Glissez pour afficher le menu

Tâche

Swipe to start coding

  • Declare an integer variable age to store the user’s age.
  • Declare a boolean variable isMember to indicate if the user is a member.
  • Use an if-else statement to check the following conditions:
    • If the user is 65 or older or isMember is true, print: Eligible for discount
    • Otherwise, print: Not eligible for discount

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 3. Chapitre 11
single

single

some-alt