From 1a9e68219eb1ded3e3132bdc45a8eba56fa67c7d Mon Sep 17 00:00:00 2001 From: Christopher Fremond Date: Fri, 6 Nov 2020 03:02:53 +0000 Subject: [PATCH] Adding of a new exercise printalt. The goal: printing the alphabet alternatively with the last and first letter first and so on. zaybxc etc... --- go/tests/prog/printalt2_prog/main.go | 7 +++++++ go/tests/prog/printalt2_test/main.go | 9 +++++++++ subjects/printalt2/README.md | 18 ++++++++++++++++++ 3 files changed, 34 insertions(+) create mode 100644 go/tests/prog/printalt2_prog/main.go create mode 100644 go/tests/prog/printalt2_test/main.go create mode 100644 subjects/printalt2/README.md diff --git a/go/tests/prog/printalt2_prog/main.go b/go/tests/prog/printalt2_prog/main.go new file mode 100644 index 00000000..93d1cff8 --- /dev/null +++ b/go/tests/prog/printalt2_prog/main.go @@ -0,0 +1,7 @@ +package main + +import "fmt" + +func main() { + fmt.Println("zaybxcwdveuftgshriqjpkolnm") +} diff --git a/go/tests/prog/printalt2_test/main.go b/go/tests/prog/printalt2_test/main.go new file mode 100644 index 00000000..c826233b --- /dev/null +++ b/go/tests/prog/printalt2_test/main.go @@ -0,0 +1,9 @@ +package main + +import ( + "lib" +) + +func main() { + lib.ChallengeMain("printalt2") +} diff --git a/subjects/printalt2/README.md b/subjects/printalt2/README.md new file mode 100644 index 00000000..bd031b93 --- /dev/null +++ b/subjects/printalt2/README.md @@ -0,0 +1,18 @@ +## printalt2 + +### Instructions + +Write a program that prints the Latin alphabet in lowercase alternatively with the last and first letters, then with the second to last and second 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]]/printalt2$ go build +student@ubuntu:~/[[ROOT]]/printalt2$ ./printalt2 +zaybxcwdveuftgshriqjpkolnm +student@ubuntu:~/[[ROOT]]/printalt2$ +```