From e5914c14bce215615a2c3946d727d545e977f6d7 Mon Sep 17 00:00:00 2001 From: hamza Date: Mon, 13 Jun 2022 10:24:22 +0100 Subject: [PATCH] add(subject): add rev-args subject --- subjects/revargs/README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 subjects/revargs/README.md diff --git a/subjects/revargs/README.md b/subjects/revargs/README.md new file mode 100644 index 000000000..8ae8c5a8f --- /dev/null +++ b/subjects/revargs/README.md @@ -0,0 +1,17 @@ +### rev-arg + +Write a program that takes the command line arguments and prints them in reverse order. +- if the number of arguments is less than 1, print (`'\n'`) + +### Usage + +```console +$ go run . | cat -e +$ +$ go run . "Hello World!" | cat -e +Hello World!$ +$ go run . "Hello World!" "World!" "All" | cat -e +All World! Hello World!$ +$ go run . 1 2 3 4 | cat -e +4 3 2 1$ +``` \ No newline at end of file