Challenge: else Keyword
Tarefa
Swipe to start coding
- Declare an integer variable
ageto store the user’s age. - Declare a boolean variable
isMemberto 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
isMemberis true, print:Eligible for discount - Otherwise, print:
Not eligible for discount
- If the user is 65 or older or
Solução
Tudo estava claro?
Obrigado pelo seu feedback!
Seção 3. Capítulo 11
single
Pergunte à IA
Pergunte à IA
Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo
Incrível!
Completion taxa melhorada para 1.25
Challenge: else Keyword
Deslize para mostrar o menu
Tarefa
Swipe to start coding
- Declare an integer variable
ageto store the user’s age. - Declare a boolean variable
isMemberto 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
isMemberis true, print:Eligible for discount - Otherwise, print:
Not eligible for discount
- If the user is 65 or older or
Solução
Tudo estava claro?
Obrigado pelo seu feedback!
Seção 3. Capítulo 11
single