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.
21 lines
607 B
21 lines
607 B
5 years ago
|
## displaya
|
||
5 years ago
|
|
||
5 years ago
|
### Instructions
|
||
5 years ago
|
|
||
![]()
4 years ago
|
Write a program that takes a `string`, and displays the first `a` character it encounters in it, followed by a newline (`'\n'`).
|
||
|
If there are no `a` characters in the string, the program just writes `a` followed by a newline (`'\n'`).
|
||
![]()
4 years ago
|
If the number of arguments is not 1, the program displays an `a` followed by a newline (`'\n'`).
|
||
5 years ago
|
|
||
5 years ago
|
### Usage
|
||
5 years ago
|
|
||
|
```console
|
||
5 years ago
|
student@ubuntu:~/[[ROOT]]/test$ go build
|
||
|
student@ubuntu:~/[[ROOT]]/test$ ./test "abc"
|
||
5 years ago
|
a
|
||
5 years ago
|
student@ubuntu:~/[[ROOT]]/test$ ./test "bcvbvA"
|
||
5 years ago
|
a
|
||
5 years ago
|
student@ubuntu:~/[[ROOT]]/test$ ./test "nbv"
|
||
5 years ago
|
a
|
||
5 years ago
|
student@ubuntu:~/[[ROOT]]/test$
|
||
5 years ago
|
```
|