public/subjects/swapargs
Hamza elkhatri 20b24a334a fix : delete `!` in usage part and rewrite the description 2022-07-14 10:32:41 +03:00
..
README.md fix : delete `!` in usage part and rewrite the description 2022-07-14 10:32:41 +03:00

README.md

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

$ go run . | cat -e
$
$ go run . 1 2 | cat -e
2 1$
$ go run . "World" "Hello" | cat -e
Hello World$