Browse Source

strlen program for the exam

pull/292/head
Augusto 5 years ago committed by Christopher Fremond
parent
commit
2f850601b9
  1. 19
      subjects/strlenprog.en.md

19
subjects/strlenprog.en.md

@ -0,0 +1,19 @@
## strlenprog
### Instructions
- Write a program that counts the characters of a `string` and that returns that value.
- If the program receives more than one `string` or no arguments must not return anything (see the `Expected output`).
### Expected output :
```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$
```
Loading…
Cancel
Save