Challenge: Filter Even Numbers
Tarefa
Swipe to start coding
Write a function that prints only the odd numbers from the provided array using a while loop and the continue statement.
- Loop through each element in the numbers array using a while loop.
- Use the continue statement to skip any even numbers.
- Print each odd number to the console.
Solução
Tudo estava claro?
Obrigado pelo seu feedback!
Seção 2. Capítulo 6
single
Pergunte à IA
Pergunte à IA
Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo
Suggested prompts:
Can you explain this in simpler terms?
What are the main points I should remember?
Can you give me an example?
Awesome!
Completion rate improved to 5.56
Challenge: Filter Even Numbers
Deslize para mostrar o menu
Tarefa
Swipe to start coding
Write a function that prints only the odd numbers from the provided array using a while loop and the continue statement.
- Loop through each element in the numbers array using a while loop.
- Use the continue statement to skip any even numbers.
- Print each odd number to the console.
Solução
Tudo estava claro?
Obrigado pelo seu feedback!
Seção 2. Capítulo 6
single