mirror of https://github.com/01-edu/public.git
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.
30 lines
825 B
30 lines
825 B
6 years ago
|
## rostring
|
||
|
|
||
|
### Instructions
|
||
|
|
||
5 years ago
|
Write a program that takes a `string` and displays this `string` after rotating it
|
||
6 years ago
|
one word to the left.
|
||
|
|
||
|
Thus, the first word becomes the last, and others stay in the same order.
|
||
|
|
||
6 years ago
|
A word is a sequence of **alphanumerical** characters.
|
||
6 years ago
|
|
||
|
Words will be separated by only one space in the output.
|
||
|
|
||
5 years ago
|
If the number of arguments is different from 1, the program displays a newline.
|
||
6 years ago
|
|
||
5 years ago
|
### Usage
|
||
6 years ago
|
|
||
|
```console
|
||
5 years ago
|
student@ubuntu:~/[[ROOT]]/rostring$ go build
|
||
|
student@ubuntu:~/[[ROOT]]/rostring$ ./rostring "abc " | cat -e
|
||
6 years ago
|
abc$
|
||
5 years ago
|
student@ubuntu:~/[[ROOT]]/rostring$ ./rostring "Let there be light"
|
||
5 years ago
|
there be light Let
|
||
5 years ago
|
student@ubuntu:~/[[ROOT]]/rostring$ ./rostring " AkjhZ zLKIJz , 23y"
|
||
6 years ago
|
zLKIJz , 23y AkjhZ
|
||
5 years ago
|
student@ubuntu:~/[[ROOT]]/rostring$ ./rostring | cat -e
|
||
6 years ago
|
$
|
||
5 years ago
|
student@ubuntu:~/[[ROOT]]/rostring$
|
||
6 years ago
|
```
|