From 2f850601b9cb64ed76d13a8ce7aa74247dfc4c18 Mon Sep 17 00:00:00 2001 From: Augusto Date: Wed, 2 Oct 2019 15:09:47 +0100 Subject: [PATCH] strlen program for the exam --- subjects/strlenprog.en.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 subjects/strlenprog.en.md diff --git a/subjects/strlenprog.en.md b/subjects/strlenprog.en.md new file mode 100644 index 00000000..e0f0ab6e --- /dev/null +++ b/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$ +```