What will the following program output?
var counter = 6
fun main() {
if(counter == 0) return
counter = counter - 1
main(counter)
main()
}
fun main(args: Int) {
print(args)
}What will the following program output?
var counter = 6
fun main() {
if(counter == 0) return
counter = counter - 1
main(counter)
main()
}
fun main(args: Int) {
print(args)
}Create a free account to access the full topic