diff --git a/subjects/compareprog.en.md b/subjects/compareprog.en.md new file mode 100644 index 000000000..dbfbf2f8e --- /dev/null +++ b/subjects/compareprog.en.md @@ -0,0 +1,24 @@ +## compareprog + +### Instructions + +Write a program that behaves like the `Compare` function. + +This program prints a number comparing two strings lexicographically. + +### Expected output : + +```console +student@ubuntu:~/compareprog$ go build +student@ubuntu:~/compareprog$ ./compareprog a b | cat -e +-1$ +student@ubuntu:~/compareprog$ ./compareprog a a | cat -e +0$ +student@ubuntu:~/compareprog$ ./compareprog b a | cat -e +1$ +student@ubuntu:~/compareprog$ ./compareprog b a d | cat -e +$ +student@ubuntu:~/compareprog$ ./compareprog | cat -e +$ +student@ubuntu:~/compareprog$ +```