Challenge: Print a Sequence
Tâche
Swipe to start coding
Write a PHP function that prints all even numbers from 2 to 20, each on a new line.
- Use a for loop to generate numbers from 2 to 20.
- Check that each number is even.
- Print each even number on a new line.
Solution
Tout était clair ?
Merci pour vos commentaires !
Section 1. Chapitre 2
single
Demandez à l'IA
Demandez à l'IA
Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion
Génial!
Completion taux amélioré à 5.56
Challenge: Print a Sequence
Glissez pour afficher le menu
Tâche
Swipe to start coding
Write a PHP function that prints all even numbers from 2 to 20, each on a new line.
- Use a for loop to generate numbers from 2 to 20.
- Check that each number is even.
- Print each even number on a new line.
Solution
Tout était clair ?
Merci pour vos commentaires !
Section 1. Chapitre 2
single