From b925196e7bd720f7c71b47806ad035ccfaed56be Mon Sep 17 00:00:00 2001 From: hamza Date: Mon, 13 Jun 2022 13:03:31 +0100 Subject: [PATCH] subject(argrot1): add readme --- subjects/argrot1/README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 subjects/argrot1/README.md diff --git a/subjects/argrot1/README.md b/subjects/argrot1/README.md new file mode 100644 index 00000000..b58c11b7 --- /dev/null +++ b/subjects/argrot1/README.md @@ -0,0 +1,20 @@ +## arg-rot1 + +### Instructions + +Write a program that rotates the arguments in the command line by 1 position. +- If the number of arguments is less than 2, print (`'\n'`). +- Print (`'\n'`) at the end of the output. + +### Usage + +```console +$ go run . | cat -e +$ +$ go run . 1 2 3 4 5 6 7 8 9 | cat -e +2 3 4 5 6 7 8 9 1$ +$ go run "Hello" "World" | cat -e +World Hello$ +$ go run . a b c d +b c d a$ +``` \ No newline at end of file