From ff60cfcf97c48ea587a71650f3e6a50ac332f78c Mon Sep 17 00:00:00 2001 From: Frenchris <34804391+Frenchris@users.noreply.github.com> Date: Thu, 2 May 2019 15:16:16 +0100 Subject: [PATCH] formating --- subjects/range.en.md | 24 ++++++++++++++++++++++++ subjects/range.md | 20 -------------------- 2 files changed, 24 insertions(+), 20 deletions(-) create mode 100644 subjects/range.en.md delete mode 100644 subjects/range.md diff --git a/subjects/range.en.md b/subjects/range.en.md new file mode 100644 index 00000000..babd2cfc --- /dev/null +++ b/subjects/range.en.md @@ -0,0 +1,24 @@ +## range + +### Instructions + +Write the function Range which must: + +- allocate (with make()) an array of integers. +- fill it with consecutive values that begin at `start` and end at `end` (Including `start` and `end` !) +- finally return that array. + +### Expected function + +```go +func Range(start, end int) []int { + +} +``` + +Examples of outputs : + +- With (1, 3) you will return an array containing 1, 2 and 3. +- With (-1, 2) you will return an array containing -1, 0, 1 and 2. +- With (0, 0) you will return an array containing 0. +- With (0, -3) you will return an array containing 0, -1, -2 and -3. diff --git a/subjects/range.md b/subjects/range.md deleted file mode 100644 index fd4fdd6d..00000000 --- a/subjects/range.md +++ /dev/null @@ -1,20 +0,0 @@ -## range - -### Instructions - -Write the following functions : - -```go -func Range(start, end int) []int{ - -} -``` - -It must allocate (with malloc()) an array of integers, fill it with consecutive values that begin at start and end at end (Including start and end !), then return a pointer to the first value of the array. - -Example of output : - -- With (1, 3) you will return an array containing 1, 2 and 3. -- With (-1, 2) you will return an array containing -1, 0, 1 and 2. -- With (0, 0) you will return an array containing 0. -- With (0, -3) you will return an array containing 0, -1, -2 and -3. \ No newline at end of file