Browse Source

docs: Rephrase instructions and remove import as per review

DEV-3241-DEV-3242-corewar
estlop 2 years ago committed by Dav Hojt
parent
commit
402b138983
  1. 13
      subjects/sum/README.md

13
subjects/sum/README.md

@ -2,7 +2,7 @@
### 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.
Write a function that takes two single digit numbers as a string and returns the sum as an int. The strings can only contain one digit which will be a positive or negative number from 0 to 9. Otherwise, you must return 0.
### Expected function
@ -19,15 +19,12 @@ Here is a possible program to test your function :
```go
package main
import (
"piscine"
"fmt"
)
import "fmt"
func main() {
fmt.Println(piscine.Sum("1", "2"))
fmt.Println(piscine.Sum("-4", "0"))
fmt.Println(piscine.Sum("7", "-3"))
fmt.Println(Sum("1", "2"))
fmt.Println(Sum("-4", "0"))
fmt.Println(Sum("7", "-3"))
}
```

Loading…
Cancel
Save