forked from root/public
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
343 B
18 lines
343 B
![]()
2 years ago
|
## 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$
|
||
|
```
|