Correct the program below so that it passes correct arguments to functions.
Introduction to functions
Function arguments
Report a typo
Write a program in Scala 3
@main def circle = {
val pi = 3.14159
val radius = 5
def square(pi: ???, radius: ???): ??? = pi * radius * ???
def circumference(diameter: Int, pi: ???): ??? = pi * diameter
println(square(pi, radius))
println(circumference(???, pi))
}
___
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.