From 445a33053117670faf4aa2a2e7766327a2b9df72 Mon Sep 17 00:00:00 2001 From: Christopher Fremond Date: Fri, 6 Nov 2020 03:04:14 +0000 Subject: [PATCH] Adding of a new exercise printalt. The goal: printing the alphabet in uppercase alternatively with the first and last letter first and so on. AZBYCX etc... --- go/tests/prog/printaltu_prog/main.go | 7 +++++++ go/tests/prog/printaltu_test/main.go | 9 +++++++++ subjects/printaltu/README.md | 18 ++++++++++++++++++ 3 files changed, 34 insertions(+) create mode 100644 go/tests/prog/printaltu_prog/main.go create mode 100644 go/tests/prog/printaltu_test/main.go create mode 100644 subjects/printaltu/README.md diff --git a/go/tests/prog/printaltu_prog/main.go b/go/tests/prog/printaltu_prog/main.go new file mode 100644 index 000000000..a9cd212cb --- /dev/null +++ b/go/tests/prog/printaltu_prog/main.go @@ -0,0 +1,7 @@ +package main + +import "fmt" + +func main() { + fmt.Println("AZBYCXDWEVFUGTHSIRJQKPLOMN") +} diff --git a/go/tests/prog/printaltu_test/main.go b/go/tests/prog/printaltu_test/main.go new file mode 100644 index 000000000..9f1552119 --- /dev/null +++ b/go/tests/prog/printaltu_test/main.go @@ -0,0 +1,9 @@ +package main + +import ( + "lib" +) + +func main() { + lib.ChallengeMain("printaltu") +} diff --git a/subjects/printaltu/README.md b/subjects/printaltu/README.md new file mode 100644 index 000000000..208019a8f --- /dev/null +++ b/subjects/printaltu/README.md @@ -0,0 +1,18 @@ +## printaltu + +### Instructions + +Write a program that prints the Latin alphabet in uppercase alternatively with the first and last letters, then with the second and second to last letters, and so on until all the alphabet letters are displayed on a single line. + +A line is a sequence of characters preceding the [end of line](https://en.wikipedia.org/wiki/Newline) character (`'\n'`). + +Please note that `casting` is not allowed for this exercise! + +### Usage + +```console +student@ubuntu:~/[[ROOT]]/printaltu$ go build +student@ubuntu:~/[[ROOT]]/printaltu$ ./printaltu +AZBYCXDWEVFUGTHSIRJQKPLOMN +student@ubuntu:~/[[ROOT]]/printaltu$ +```