From a897693411284b5da74183714a597016b8a61e18 Mon Sep 17 00:00:00 2001 From: Christopher Fremond Date: Wed, 23 Oct 2019 00:43:53 +0100 Subject: [PATCH] update of en version of nbrconvertalpha and creation of placeholder for fr version --- subjects/nbrconvertalpha.en.md | 12 ++++++------ subjects/nbrconvertalpha.fr.md | 25 +++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 6 deletions(-) create mode 100644 subjects/nbrconvertalpha.fr.md diff --git a/subjects/nbrconvertalpha.en.md b/subjects/nbrconvertalpha.en.md index 4bd20dace..4d2d054ab 100644 --- a/subjects/nbrconvertalpha.en.md +++ b/subjects/nbrconvertalpha.en.md @@ -2,18 +2,18 @@ ### Instructions -Write a **program** that prints the corresponding letter in the `n` position of the alphabet, where `n` is each argument received. +Write a **program** that prints the corresponding letter in the `n` position of the classic latin alphabet, where `n` is each argument received. -For example 1 is a, 2 is b, etc. If `n` is not a valid position of the alphabet or if the argument is not an integer, the **program** should print a space (" "). +For example `1` matches `a`, `2` matches `b`, etc. If `n` does not match a valid position of the alphabet or if the argument is not an integer, the **program** should print a space (" "). -It should be implemented a flag `--upper` that prints the result in upper case. +A flag `--upper` should be implemented. When used the program prints the result in upper case. ### Usage -```console +```console student@ubuntu:~/student/test$ go build -student@ubuntu:~/student/test$ ./nbrconvertalpha - +student@ubuntu:~/student/test$ ./nbrconvertalpha | cat -e +$ student@ubuntu:~/student/test$ ./nbrconvertalpha 8 5 12 12 15 | cat -e hello$ student@ubuntu:~/student/test$ ./nbrconvertalpha 12 5 7 5 14 56 4 1 18 25 | cat -e diff --git a/subjects/nbrconvertalpha.fr.md b/subjects/nbrconvertalpha.fr.md new file mode 100644 index 000000000..4d2d054ab --- /dev/null +++ b/subjects/nbrconvertalpha.fr.md @@ -0,0 +1,25 @@ +## nbrconvertalpha + +### Instructions + +Write a **program** that prints the corresponding letter in the `n` position of the classic latin alphabet, where `n` is each argument received. + +For example `1` matches `a`, `2` matches `b`, etc. If `n` does not match a valid position of the alphabet or if the argument is not an integer, the **program** should print a space (" "). + +A flag `--upper` should be implemented. When used the program prints the result in upper case. + +### Usage + +```console +student@ubuntu:~/student/test$ go build +student@ubuntu:~/student/test$ ./nbrconvertalpha | cat -e +$ +student@ubuntu:~/student/test$ ./nbrconvertalpha 8 5 12 12 15 | cat -e +hello$ +student@ubuntu:~/student/test$ ./nbrconvertalpha 12 5 7 5 14 56 4 1 18 25 | cat -e +legen dary$ +student@ubuntu:~/student/test$ ./nbrconvertalpha 32 86 h | cat -e + $ +student@ubuntu:~/student/test$ ./nbrconvertalpha --upper 8 5 25 | cat -e +HEY$ +```