diff --git a/subjects/capitalizeprog.en.md b/subjects/capitalizeprog.en.md index 732a90a7..0151c867 100644 --- a/subjects/capitalizeprog.en.md +++ b/subjects/capitalizeprog.en.md @@ -6,18 +6,18 @@ Write a program that capitalizes the first letter of each word **and** lowercase - 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 is more than one argument the program should print `Too many arguments`. -- If there's no arguments given to the program it should print a new line `\n`. +- If there is no arguments given the program should print a newline ("`\n`"). -### Expected output : +### Usage : ```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 "Hello! How are you? How+are+things+4you?" | cat -e +Hello! How Are You? How+Are+Things+4you?$ +student@ubuntu:~/capitalizeprog$ ./capitalizeprog Hello! How are you? | cat -e +Too many arguments$ student@ubuntu:~/capitalizeprog$ ./capitalizeprog student@ubuntu:~/capitalizeprog$ diff --git a/subjects/capitalizeprog.fr.md b/subjects/capitalizeprog.fr.md new file mode 100644 index 00000000..301dc19b --- /dev/null +++ b/subjects/capitalizeprog.fr.md @@ -0,0 +1,24 @@ +## capitalizeprog + +### Instructions + +Écrire un programme qui met en majuscule la première lettre de chaque mot et en minuscule les autres lettres du reste du mot d'une `string`. + +- Un mot est une suite de caractères **alphanumériques**. + +- Si il y a plus d'un argument le programme doit afficher `Too many arguments`. + +- Si il n'y a pas d'arguments le programme doit afficher un newline ("`\n`"). + +### Utilisation : + +```console +student@ubuntu:~/capitalizeprog$ go build +student@ubuntu:~/capitalizeprog$ ./capitalizeprog "Hello! How are you? How+are+things+4you?" | cat -e +Hello! How Are You? How+Are+Things+4you?$ +student@ubuntu:~/capitalizeprog$ ./capitalizeprog Hello! How are you? | cat -e +Too many arguments$ +student@ubuntu:~/capitalizeprog$ ./capitalizeprog + +student@ubuntu:~/capitalizeprog$ +```