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.
|
|
|
## 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.
|
|
|
|
- All outputs should be followed by a newline character.
|
|
|
|
- If the argument is more than one character, 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$
|
|
|
|
```
|