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
912 B
29 lines
912 B
6 years ago
|
|
||
|
# switchcase
|
||
|
|
||
|
## Instructions
|
||
|
|
||
6 years ago
|
Write a program that takes two strings and checks whether it is possible to write the first string with characters from the second string, while respecting the order in which these characters appear in the second string.
|
||
6 years ago
|
|
||
6 years ago
|
- If it is possible, the program displays the string followed by a `\n`, otherwise it simply displays a `\n`.
|
||
6 years ago
|
|
||
|
- If the number of arguments is not 2, the program displays `\n`.
|
||
|
|
||
6 years ago
|
Example of output :
|
||
6 years ago
|
|
||
|
```console
|
||
|
student@ubuntu:~/piscine/test$ go build
|
||
6 years ago
|
student@ubuntu:~/piscine/test$ ./test "faya" "fgvvfdxcacpolhyghbreda"
|
||
6 years ago
|
faya
|
||
|
student@ubuntu:~/piscine/test$ ./test "faya" "fgvvfdxcacpolhyghbred"
|
||
|
|
||
6 years ago
|
student@ubuntu:~/piscine/test$ ./test "error" rrerrrfiiljdfxjyuifrrvcoojh
|
||
6 years ago
|
|
||
6 years ago
|
student@ubuntu:~/piscine/test$ ./test "quarante deux" "qfqfsudf arzgsayns tsregfdgs sjytdekuoixq "
|
||
|
quarante deux
|
||
6 years ago
|
|
||
6 years ago
|
student@ubuntu:~/piscine/test$ ./test
|
||
6 years ago
|
|
||
6 years ago
|
student@ubuntu:~/piscine/test$
|
||
|
```
|