Function arguments

Report a typo

Correct the program below so that it passes correct arguments to functions.

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))
}
___

Create a free account to access the full topic