Challenge: Fill an Array
Task
Your task is to create an array of integers of size 20
named testArray
and fill it with numbers from 1 to 20 inclusive using a for loop with the loop variable named i
to iterate over its indices in a concise way.
Main.java
12345678object Main { def main(args: Array[String]): Unit = { var ___ = new ___[___](___) // Declare an array variable for (___ ___ testArray.___) { ___(___) = ___ // Fill the array } } }
Merci pour vos commentaires !
Demandez à l'IA
Demandez à l'IA
Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion
Posez-moi des questions sur ce sujet
Résumer ce chapitre
Afficher des exemples du monde réel
Awesome!
Completion rate improved to 2.86
Challenge: Fill an Array
Glissez pour afficher le menu
Task
Your task is to create an array of integers of size 20
named testArray
and fill it with numbers from 1 to 20 inclusive using a for loop with the loop variable named i
to iterate over its indices in a concise way.
Main.java
12345678object Main { def main(args: Array[String]): Unit = { var ___ = new ___[___](___) // Declare an array variable for (___ ___ testArray.___) { ___(___) = ___ // Fill the array } } }
Merci pour vos commentaires !