mirror of https://github.com/01-edu/public.git
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.
20 lines
579 B
20 lines
579 B
5 years ago
|
## strlenprog
|
||
|
|
||
|
### Instructions
|
||
|
|
||
|
- Écrire un programme qui compte le nombre de caractères d'une `string` et qui retourne le nombre trouvé.
|
||
|
|
||
|
- Si le programme reçoit plusieurs ou aucun arguments il ne doit rien afficher.
|
||
|
|
||
|
### Utilisation :
|
||
|
|
||
|
```console
|
||
|
student@ubuntu:~/piscine-go/strlenprog$ go build
|
||
|
student@ubuntu:~/piscine-go/strlenprog$ ./strlenprog "hello"
|
||
|
5
|
||
|
student@ubuntu:~/piscine-go/strlenprog$ ./strlenprog
|
||
|
student@ubuntu:~/piscine-go/strlenprog$
|
||
|
student@ubuntu:~/piscine-go/strlenprog$ ./strlenprog "hello" "how are you"
|
||
|
student@ubuntu:~/piscine-go/strlenprog$
|
||
|
```
|