Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn Challenge: Filter Even Numbers | Section
Practice
Projects
Quizzes & Challenges
Quizzes
Challenges
/
C# Loops Practice
Sectionย 1. Chapterย 12
single

single

bookChallenge: Filter Even Numbers

Swipe to show menu

Task

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.

Solution

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

Sectionย 1. Chapterย 12
single

single

Ask AI

expand

Ask AI

ChatGPT

Ask anything or try one of the suggested questions to begin our chat

some-alt