Challenge: Nesting in Loops
Task
Create a for loop using to
and print only even numbers from 2
to 10
inclusive using a nested if statement.
Main.java
123456789object Main { def main(args: Array[String]): Unit = { for ___ { if ___ { // Check if i is even ___ // Print the value of i } } } }
Tudo estava claro?
Obrigado pelo seu feedback!
Seção 3. Capítulo 7
Pergunte à IA
Pergunte à IA
Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo
Awesome!
Completion rate improved to 2.86
Challenge: Nesting in Loops
Deslize para mostrar o menu
Task
Create a for loop using to
and print only even numbers from 2
to 10
inclusive using a nested if statement.
Main.java
123456789object Main { def main(args: Array[String]): Unit = { for ___ { if ___ { // Check if i is even ___ // Print the value of i } } } }
Tudo estava claro?
Obrigado pelo seu feedback!
Seção 3. Capítulo 7