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.
xpetit
32eddefd09
|
4 years ago | |
---|---|---|
.. | ||
README.md | 4 years ago |
README.md
displaya
Instructions
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'
).
If the number of arguments is not 1, the program displays an a
followed by a newline ('\n'
).
Usage
student@ubuntu:~/displaya/test$ go build
student@ubuntu:~/displaya/test$ ./test "abc"
a
student@ubuntu:~/displaya/test$ ./test "bcvbvA"
a
student@ubuntu:~/displaya/test$ ./test "nbv"
a
student@ubuntu:~/displaya/test$