Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Oppiskele Challenge: else Keyword | Ohjausrakenteet
Practice
Projects
Quizzes & Challenges
Quizzes
Challenges
/
C# Perusteet

book Challenge: else Keyword

Tehtävä

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

Ratkaisu

Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 3. Luku 11
single

single

Kysy tekoälyä

expand

Kysy tekoälyä

ChatGPT

Kysy mitä tahansa tai kokeile jotakin ehdotetuista kysymyksistä aloittaaksesi keskustelumme

close

book Challenge: else Keyword

Pyyhkäise näyttääksesi valikon

Tehtävä

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

Ratkaisu

Switch to desktopVaihda työpöytään todellista harjoitusta vartenJatka siitä, missä olet käyttämällä jotakin alla olevista vaihtoehdoista
Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 3. Luku 11
single

single

some-alt