Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lære Challenge: Print Odd Numbers | For Loops: Fundamentals and Applications
Quizzes & Challenges
Quizzes
Challenges
/
C# Loops Practice

bookChallenge: Print Odd Numbers

Oppgave

Swipe to start coding

Write a program that prints all odd numbers from 1 to 20 using a for loop with a custom step.

  • Use a for loop to iterate through numbers starting at 1 and ending before 20.
  • Set the step value in the loop so that only odd numbers are processed.
  • Print each odd number on a new line.

Løsning

Alt var klart?

Hvordan kan vi forbedre det?

Takk for tilbakemeldingene dine!

Seksjon 1. Kapittel 2
single

single

Spør AI

expand

Spør AI

ChatGPT

Spør om hva du vil, eller prøv ett av de foreslåtte spørsmålene for å starte chatten vår

close

Awesome!

Completion rate improved to 5.56

bookChallenge: Print Odd Numbers

Sveip for å vise menyen

Oppgave

Swipe to start coding

Write a program that prints all odd numbers from 1 to 20 using a for loop with a custom step.

  • Use a for loop to iterate through numbers starting at 1 and ending before 20.
  • Set the step value in the loop so that only odd numbers are processed.
  • Print each odd number on a new line.

Løsning

Switch to desktopBytt til skrivebordet for virkelighetspraksisFortsett der du er med et av alternativene nedenfor
Alt var klart?

Hvordan kan vi forbedre det?

Takk for tilbakemeldingene dine!

Seksjon 1. Kapittel 2
single

single

some-alt