From a1256eb404dbef9d5985488e623a4b6b10783a75 Mon Sep 17 00:00:00 2001 From: lee Date: Wed, 2 Oct 2019 15:16:39 +0100 Subject: [PATCH] capitalizeprog readme for the exams --- subjects/capitalizeprog.en.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 subjects/capitalizeprog.en.md diff --git a/subjects/capitalizeprog.en.md b/subjects/capitalizeprog.en.md new file mode 100644 index 00000000..732a90a7 --- /dev/null +++ b/subjects/capitalizeprog.en.md @@ -0,0 +1,24 @@ +## capitalizeprog + +### Instructions + +Write a program that capitalizes the first letter of each word **and** lowercases the rest of each word of a `string`. + +- A word is a sequence of **alphanumerical** characters. + +- If the number of arguments is bigger than one it should print `To many arguments`. + +- If there's no arguments given to the program it should print a new line `\n`. + +### Expected output : + +```console +student@ubuntu:~/capitalizeprog$ go build +student@ubuntu:~/capitalizeprog$ ./capitalizeprog "Hello! How are you? How+are+things+4you?" +Hello! How Are You? How+Are+Things+4you? +student@ubuntu:~/capitalizeprog$ ./capitalizeprog Hello! How are you? +To many arguments +student@ubuntu:~/capitalizeprog$ ./capitalizeprog + +student@ubuntu:~/capitalizeprog$ +```