From 08cedb74d3215a3b4f843d2fae3977d8ec4edf58 Mon Sep 17 00:00:00 2001 From: jrosendo Date: Mon, 5 Dec 2022 11:56:25 +0000 Subject: [PATCH] docs(returna): created a subject for returna exercise - created branch to fix old PR that had too many conflicts --- subjects/returna/README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 subjects/returna/README.md diff --git a/subjects/returna/README.md b/subjects/returna/README.md new file mode 100644 index 00000000..75ed2482 --- /dev/null +++ b/subjects/returna/README.md @@ -0,0 +1,21 @@ +## returna + +### Instructions + +Write a program that takes a `string` as an argument, if the `string` contains the letter `a` then print `Contains the letter` followed by a newline `\n`. + +- If there is no character `a` in the `string`, the program writes `!(Contains the letter)` followed by a newline `\n`. +- If the number of parameters is not 1, the program displays a newline `\n`. + +### Usage + +```console +$ go run . "do I exist" | cat -e +!(Contains the letter)$ +$ +$ go run . "I do exist a" | cat -e +Contains the letter$ +$ +$ go run . "one" "two" | cat -e +$ +```