forked from root/public
Compare commits
3 Commits
master
...
1124-swap-
Author | SHA1 | Date |
---|---|---|
Hamza elkhatri | 416bc93dea | 2 years ago |
Hamza elkhatri | 0846b824c1 | 2 years ago |
hamza | c0751881a8 | 2 years ago |
1 changed files with 19 additions and 0 deletions
@ -0,0 +1,19 @@
|
||||
## swap-args |
||||
|
||||
### Instructions |
||||
|
||||
Write a program that takes two arguments and swaps them. |
||||
- If the number of arguments is different from 2, print (`'\n'`). |
||||
- The arguments must be separated by a withe space. |
||||
- Print (`'\n'`) at the end of the program. |
||||
|
||||
### Usage |
||||
|
||||
```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