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.
 
 
 
 
 
 
MOHAMED a8ddec8fc3 fix: remove number backticks 2 years ago
..
README.md fix: remove number backticks 2 years ago

README.md

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

func RectPerimeter(l, w int) int {

}

Usage

package main

import (
	"fmt"
	"piscine"
)

func main() {
	fmt.Println(piscine.RectPerimeter(10, 2))
	fmt.Println(piscine.RectPerimeter(434343, 898989))
}