You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Hamza elkhatri 1727ae0d86 Update README.md 2 years ago
..
README.md Update README.md 2 years ago

README.md

between-us

write a function named BetweenUs that takes 3 paramters and return :

  • if the first paramter is between the second and third paramters, return true else return false

Function

func BetweenUs(num, min, max int) bool {
    // Your code here
}

Usage

package main

import "fmt"

func main(){
    fmt.Println(BetweenUs(1, 2, 3))
    fmt.Println(BetweenUs(1, 1, 3))
    fmt.Println(BetweenUs(1, 3, 3))
    fmt.Println(BetweenUs(1, 1, 1))
    fmt.Println(BetweenUs(1, 2, 1))
    fmt.Println(BetweenUs(-1, -10, 0))
}
$ go run .
false
true
false
true
false
true