Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lernen Challenge: Filter Even Numbers | While and Do-While Loops: Control and Flexibility
C# Loops Practice
close
Abschnitt 2. Kapitel 6
single

single

bookChallenge: Filter Even Numbers

Swipe um das Menü anzuzeigen

Aufgabe

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.

Lösung

Switch to desktopWechseln Sie zum Desktop, um in der realen Welt zu übenFahren Sie dort fort, wo Sie sind, indem Sie eine der folgenden Optionen verwenden
War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 2. Kapitel 6
single

single

Fragen Sie AI

expand

Fragen Sie AI

ChatGPT

Fragen Sie alles oder probieren Sie eine der vorgeschlagenen Fragen, um unser Gespräch zu beginnen

some-alt