Challenge: Operators
Tehtävä
Swipe to start coding
- Declare an
intvariable for the user's age. - Declare a
boolvariable for membership status. - Use comparison operators (
>=) to check if age is 65 or older. - Use logical operators (
||) to check if the user is a member. - Use a ternary operator (
?:) to assign the message"Eligible for discount"or"Not eligible for discount"based on the conditions. - Print the message to the console using
Console.WriteLine.
Ratkaisu
Oliko kaikki selvää?
Kiitos palautteestasi!
Osio 3. Luku 4
single
Kysy tekoälyä
Kysy tekoälyä
Kysy mitä tahansa tai kokeile jotakin ehdotetuista kysymyksistä aloittaaksesi keskustelumme
Mahtavaa!
Completion arvosana parantunut arvoon 1.25
Challenge: Operators
Pyyhkäise näyttääksesi valikon
Tehtävä
Swipe to start coding
- Declare an
intvariable for the user's age. - Declare a
boolvariable for membership status. - Use comparison operators (
>=) to check if age is 65 or older. - Use logical operators (
||) to check if the user is a member. - Use a ternary operator (
?:) to assign the message"Eligible for discount"or"Not eligible for discount"based on the conditions. - Print the message to the console using
Console.WriteLine.
Ratkaisu
Oliko kaikki selvää?
Kiitos palautteestasi!
Osio 3. Luku 4
single