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.
23 lines
574 B
23 lines
574 B
6 years ago
|
## displayz
|
||
6 years ago
|
|
||
6 years ago
|
### Instructions
|
||
6 years ago
|
|
||
|
Write a program that takes a string, and displays the first 'a' character it
|
||
|
encounters in it, followed by a newline. If there are no 'a' characters in the
|
||
|
string, the program just writes a newline. If the number of parameters is not
|
||
|
1, the program displays 'a' followed by a newline.
|
||
|
|
||
6 years ago
|
### Expected output
|
||
6 years ago
|
|
||
|
```console
|
||
|
student@ubuntu:~/piscine/test$ go build
|
||
|
student@ubuntu:~/piscine/test$ ./test "abc"
|
||
|
z
|
||
|
student@ubuntu:~/piscine/test$ ./test "bcvbvZ"
|
||
|
z
|
||
|
student@ubuntu:~/piscine/test$ ./test "nbz"
|
||
|
z
|
||
|
student@ubuntu:~/piscine/test$ ./test
|
||
|
z
|
||
6 years ago
|
```
|