Multiple return values

Report a typo

Update the function's signature of the getRectangleData() function so that its parameter list can accept two float64 parameters length and width; and also update the return type, so it returns two float64 types.

Remember that when you have more than one return type, you need to wrap the return type list within parentheses and separate the return types with commas: (type, type).

Sample Input 1:

2.50 5.00

Sample Output 1:

The area of the rectangle is: 12.5
The perimeter of the rectangle is: 15
Write a program in Go
package main

import "fmt"

// Update the function's signature of getRectangleData() below:
func getRectangleData(?) (?) {
area := length * width
perimeter := 2 * (length + width)

return area, perimeter
}

// DO NOT delete or modify the contents within the main function.
func main() {
var length, width float64
fmt.Scanln(&length, &width)

area, perimeter := getRectangleData(length, width)
fmt.Println("The area of the rectangle is:", area)
fmt.Println("The perimeter of the rectangle is:", perimeter)
}
___

Create a free account to access the full topic