forked from root/public
hamza
2 years ago
committed by
Dav Hojt
1 changed files with 18 additions and 0 deletions
@ -0,0 +1,18 @@
|
||||
## swap-args |
||||
|
||||
### Instructions |
||||
Write a program that takes two arguments and swaps them |
||||
- If the arguments are not 2 print (`'\n'`). |
||||
- Separate the arguments with (`' '`) |
||||
- Print (`'\n'`) at the end of the output. |
||||
|
||||
### Example |
||||
|
||||
```console |
||||
$ go run . | cat -e |
||||
$ |
||||
$ go run . 1 2 | cat -e |
||||
2 1$ |
||||
$ go run . "World" "Hello" | cat -e |
||||
Hello! World$ |
||||
``` |
Loading…
Reference in new issue