Answers for "golang recursive function"

Go
0

Go Recursion in Golang

package main
import "fmt"

func countDown(number int) {

  fmt.Println("Countdown Starts:")

  // display the number
  fmt.Println(number)

    // recursive call by decreasing number
    countDown(number - 1)

  }

func main() {
  countDown(3)
}
Posted by: Guest on June-16-2022

Code answers related to "golang recursive function"

Browse Popular Code Answers by Language