From 1982384bbb24dddf5c2917bd502726b67132ddb0 Mon Sep 17 00:00:00 2001 From: Mohamed Zaboub <45185441+mohamedLazyBob@users.noreply.github.com> Date: Fri, 10 Jun 2022 09:03:36 +0100 Subject: [PATCH] add(subject): rectperimeter exercise --- subjects/rectperimeter/README.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 subjects/rectperimeter/README.md diff --git a/subjects/rectperimeter/README.md b/subjects/rectperimeter/README.md new file mode 100644 index 000000000..8830f9519 --- /dev/null +++ b/subjects/rectperimeter/README.md @@ -0,0 +1,32 @@ +# rectperimeter + +### Instructions + +write a function that accepts two integer arguments, representing the two sides length of a rectangle and returning the perimeter of the rectangle. + +your function should return `-1` if one of the arguments is negative. + +### Expected function + +```go +func RectPerimeter(l, w int) int { + +} +``` + +### Usage + + +```go +package main + +import ( + "fmt" + "piscine" +) + +func main() { + fmt.Println(piscine.RectPerimeter(10, 2)) + fmt.Println(piscine.RectPerimeter(434343, 898989)) +} +```