From 6322b1f4e0e3d77fdbe47aa855a6679dcf1565d3 Mon Sep 17 00:00:00 2001 From: hamza Date: Tue, 7 Jun 2022 12:31:52 +0100 Subject: [PATCH] feat: add new exam exercise --- subjects/front-back/README.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 subjects/front-back/README.md diff --git a/subjects/front-back/README.md b/subjects/front-back/README.md new file mode 100644 index 00000000..f822a2bd --- /dev/null +++ b/subjects/front-back/README.md @@ -0,0 +1,26 @@ +## front-back + +## front-back + +- Write a program that prints the previous and next alphabet of a given alphabet. + - If the number of arguments is different from `1`, print `"\n"`. + - If the length of the argument is different from `1`, print `"\n"` + - If the argument is not a letter, print `"\n"` + - Print the previous alphabet and the next alphabet except for the last alphabet of the alphabet. + +### Usage + +```shell +$ go run . | cat -e +$ +$ go run . a | cat -e +ab$ +$ go run . "B" | cat -e +ABC$ +$ go run . "z" | cat -e +yz$ +$ go run . "Hello World!" | cat -e +$ +$ go run . "1" | cat -e +$ +```