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.
 
 
 
 
 
 
estlop 5ebf4a257a Rephrase to make clear the expected input to handle 2 years ago
..
README.md Rephrase to make clear the expected input to handle 2 years ago

README.md

sum

Instructions

Write a function that takes two single digit numbers as a string and returns the sum as an int. If the number of digits from one of the arguments is more than one, return 0.

Expected function

func Sum(a,b string) int {

}

Usage

Here is a possible program to test your function :

package main

import (
    "piscine"
    "fmt"
)

func main() {
	fmt.Println(piscine.Sum("1", "2"))
	fmt.Println(piscine.Sum("-4", "0"))
	fmt.Println(piscine.Sum("7", "-3"))
}

And its output :

$ go run . | cat -e
3$
-4$
4$
$