Modify the program below to output the first 20 Fibonacci numbers, each on a new line.
Branching
Fibonacci sequence
Report a typo
Write a program in Scala 3
def printNumber(???, ???, count: Int): Unit =
if (count > 0) {
println(???)
printNumber(???, ???, count - 1)
}
@main def fibonacci =
printNumber(0, 1, ???)
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.