Browse Source

update of capitalizeprog subjects en and fr

content-update
Christopher Fremond 5 years ago committed by Christopher Fremond
parent
commit
e1aa6a3b87
  1. 14
      subjects/capitalizeprog.en.md
  2. 24
      subjects/capitalizeprog.fr.md

14
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$

24
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$
```
Loading…
Cancel
Save