Signup/Sign In
Ask Question
Not satisfied by the Answer? Still looking for a better solution?

Level 6 > Lesson 8

package main
import "fmt"

func areaOfRect(length float64, breadth float64) float64{
// write code here

return length*breadth

}

func main() {
area := areaOfRect(7,9)
fmt.Println("Area of Rectangle is: ", area)
}

why it showing in studytonight compiler "
Have you added the return statement in the function areaOfRect?"
by

3 Answers

iamabhishek
Hi, your code is absolutely correct, there was some issue with the system. Please refresh and try again. It should work now.
rajnishsinghrajpoot
hi abhishek sir...i tried it many times but it gives only "Your code's output does not match the expected outcome for this exercise. ". Sir plz do something without this i cant proceed for next step. next week mera placement start hone ko hai
ayanali
func areaOfRect(length float64, breadth float64) float64 {
// write code here
return length * breadth
}

Login / Signup to Answer the Question.