belongs to collection: Kotlin programming Exercises
Write a program to print numbers from 10 to 1 using recursion function
Solution:
fun main(args : Array<String>) { for (x in 10 downTo 1) println("$x") }
Output:
10 9 8 7 6 5 4 3 2 1
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
Solution:
Output:
need an explanation for this answer? contact us directly to get an explanation for this answer