From 3e2abce5eab27ab0ef1a036b7a65597bcf07fc03 Mon Sep 17 00:00:00 2001 From: Augusto Date: Fri, 19 Apr 2019 10:35:48 +0100 Subject: [PATCH] exam exercise readme for alphamirror --- subjects/alphamirror.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 subjects/alphamirror.md diff --git a/subjects/alphamirror.md b/subjects/alphamirror.md new file mode 100644 index 00000000..1be50bf1 --- /dev/null +++ b/subjects/alphamirror.md @@ -0,0 +1,28 @@ +# alphamirror +## Instructions + +Write a program called alpha_mirror that takes a string and displays this string +after replacing each alphabetical character by the opposite alphabetical +character, followed by a newline. + +'a' becomes 'z', 'Z' becomes 'A' +'d' becomes 'w', 'M' becomes 'N' + +and so on. + +Case is not changed. + +If the number of arguments is not 1, display only a newline. + +And its output : + +```console +student@ubuntu:~/student/alphamirror$ go build +student@ubuntu:~/student/alphamirror$ ./alphamirror "abc" +zyx +student@ubuntu:~/student/alphamirror$ ./alphamirror "My horse is Amazing." | cat -e +Nb slihv rh Znzarmt.$ +student@ubuntu:~/student/alphamirror$ ./alphamirror | cat -e +$ +student@ubuntu:~/student/alphamirror$ +```