Browse Source

Merge pull request #45 from 01-edu/readmes

wdmatch readme for the exams
pull/76/head
Frenchris 5 years ago committed by GitHub
parent
commit
5af4e652c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 17
      subjects/wdmatch.en.md

17
subjects/wdmatch.en.md

@ -1,22 +1,25 @@
## switchcase
# wdmatch
### Instructions
## Instructions
Write a program that takes two strings and checks whether it's 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.
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.
- If it's possible, the program displays the string followed by a `\n`, otherwise it simply displays a `\n`.
- If it is possible, the program displays the string followed by a `\n`, otherwise it simply displays a `\n`.
- If the number of arguments is not 2, the program displays `\n`.
### Expected output
Example of output :
```console
student@ubuntu:~/piscine/test$ go build
student@ubuntu:~/piscine/test$ ./test "faya" "fgvvfdxcacpolhyghbreda"
student@ubuntu:~/piscine/test$ ./test "faya" "fgvvfdxcacpolhyghbreda"
faya
student@ubuntu:~/piscine/test$ ./test "faya" "fgvvfdxcacpolhyghbred"
student@ubuntu:~/piscine/test$ ./test "error"
student@ubuntu:~/piscine/test$ ./test "error" rrerrrfiiljdfxjyuifrrvcoojh
student@ubuntu:~/piscine/test$ ./test "quarante deux" "qfqfsudf arzgsayns tsregfdgs sjytdekuoixq "
quarante deux
student@ubuntu:~/piscine/test$ ./test

Loading…
Cancel
Save