|
|
@ -1,5 +1,7 @@ |
|
|
|
### rev-arg |
|
|
|
### rev-arg |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### Instructions |
|
|
|
|
|
|
|
|
|
|
|
Write a program that takes the command line arguments and prints them in reverse order. |
|
|
|
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'`) |
|
|
|
- if the number of arguments is less than 1, print (`'\n'`) |
|
|
|
|
|
|
|
|
|
|
@ -14,4 +16,4 @@ $ go run . "Hello World!" "World!" "All" | cat -e |
|
|
|
All World! Hello World!$ |
|
|
|
All World! Hello World!$ |
|
|
|
$ go run . 1 2 3 4 | cat -e |
|
|
|
$ go run . 1 2 3 4 | cat -e |
|
|
|
4 3 2 1$ |
|
|
|
4 3 2 1$ |
|
|
|
``` |
|
|
|
``` |
|
|
|