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.
29 lines
1.0 KiB
29 lines
1.0 KiB
5 years ago
|
## rotatevowels
|
||
|
|
||
|
### Instructions
|
||
|
|
||
|
Write a **program** that checks the arguments for vowels.
|
||
|
|
||
5 years ago
|
- If the argument contains vowels (for this exercise `y` is not considered a vowel) the program has to **"mirror"** the position of the vowels in the argument (see the examples).
|
||
|
- If the number of arguments is less than 1, the program display a new line ("`\n`").
|
||
|
- If the arguments does not have any vowels, the program just prints the arguments.
|
||
5 years ago
|
|
||
|
Example of output :
|
||
|
|
||
|
```console
|
||
5 years ago
|
student@ubuntu:~/[[ROOT]]/test$ go build
|
||
|
student@ubuntu:~/[[ROOT]]/test$ ./rotatevowels "Hello World" | cat -e
|
||
5 years ago
|
Hollo Werld$
|
||
5 years ago
|
student@ubuntu:~/[[ROOT]]/test$ ./rotatevowels "HEllO World" "problem solved"
|
||
5 years ago
|
Hello Werld problom sOlvEd
|
||
5 years ago
|
student@ubuntu:~/[[ROOT]]/test$ ./rotatevowels "str" "shh" "psst"
|
||
5 years ago
|
str shh psst
|
||
5 years ago
|
student@ubuntu:~/[[ROOT]]/test$ ./rotatevowels "happy thoughts" "good luck"
|
||
5 years ago
|
huppy thooghts guod lack
|
||
5 years ago
|
student@ubuntu:~/[[ROOT]]/test$ ./rotatevowels "aEi" "Ou"
|
||
5 years ago
|
uOi Ea
|
||
5 years ago
|
student@ubuntu:~/[[ROOT]]/test$ ./rotatevowels
|
||
5 years ago
|
|
||
5 years ago
|
student@ubuntu:~/[[ROOT]]/test$
|
||
5 years ago
|
```
|