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.
 
 
 
 
 
Tiago Collot 8bd3f6c935 feat(piscine-go): Add README.md for new go exercise descendappendrange 2 years ago
..
README.md feat(piscine-go): Add README.md for new go exercise descendappendrange 2 years ago

README.md

descendappendrange

Instructions

  • Write a function that takes an int max and an int min as parameters. The function should return a slice of ints with all the values between the max and min.

  • The Maxmust be included, and min must be excluded.

  • If max is inferior than or equal to min, a nil slice is returned.

  • makeis not allowed for this exercise

Expected function

func DescendAppendRange(max, min int) []int {

}

Usage

Here is a possible program to test your function:

package main

import (
	"fmt"
	"piscine"
)

func main() {
	fmt.Println(piscine.DescendAppendRange(10, 5))
	fmt.Println(piscine.DescendAppendRange(5, 10))
}

And its output:

$ go run .
[10 9 8 7 6]
[]
$