Compare commits

...

7 Commits

Author SHA1 Message Date
zainabdnaya 7fe5f0851c Corrected 2 years ago
zainabdnaya 9ec6a23ba8 corrected 2 years ago
zainabdnaya ca19aec9d7 corrected 2 years ago
zainabdnaya 65e87084e1 corrected 2 years ago
zainabdnaya ffa9b9b139 Correct Same Case 2 years ago
zainabdnaya 9c98dc0d8c subject correction 2 years ago
zainabdnaya 3f98031242 feat : add samecase sunject 2 years ago
  1. 27
      subjects/samecase/REDME.md

27
subjects/samecase/REDME.md

@ -0,0 +1,27 @@
## Same-Case
### Instructions
Write a program that takes 2 characters as arguments and does the following:
- If either of the characters is not a letter, return -1.
- If both characters are the same case, return 1.
- If both characters are letters but not the same case, return 0.
- A newline character should follow all outputs.
- If the argument is more than one character or if it's empty, return a newline.
### Usage
```console
$ go run . | cat -e
$
$ go run . "p" "w"| cat -e
1$
$ go run . "p" "Q" | cat -e
0$
$ go run . "p" "4" | cat -e
-1$
$ go run . "P" "Q" "W" | cat -e
$
$ go run . A b | cat -e
0$
```
Loading…
Cancel
Save