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.

41 lines
627 B

5 years ago
## isnegative
5 years ago
### Instructions
Écrire une [fonction](TODO-LINK) qui affiche `'T'` (true) sur une seule ligne si l'`int` passé en paramètre est négatif, sinon elle affiche `'F'` (false).
5 years ago
### Fonction attendue
```go
func IsNegative(nb int) {
}
```
5 years ago
### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
```go
package main
import piscine ".."
func main() {
piscine.IsNegative(1)
piscine.IsNegative(0)
piscine.IsNegative(-1)
}
```
Et son résultat :
```console
student@ubuntu:~/piscine/test$ go build
student@ubuntu:~/piscine/test$ ./test
F
F
T
student@ubuntu:~/piscine/test$
```