From df72f1889e8f217e13d3c6ceb3416528ef9311bb Mon Sep 17 00:00:00 2001 From: Christopher Fremond Date: Thu, 3 Oct 2019 05:05:16 +0100 Subject: [PATCH] update of subjects en et fr --- subjects/compareprog.en.md | 4 ++-- subjects/compareprog.fr.md | 24 ++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 subjects/compareprog.fr.md diff --git a/subjects/compareprog.en.md b/subjects/compareprog.en.md index dbfbf2f8e..0d648f309 100644 --- a/subjects/compareprog.en.md +++ b/subjects/compareprog.en.md @@ -4,9 +4,9 @@ Write a program that behaves like the `Compare` function. -This program prints a number comparing two strings lexicographically. +This program prints a number after comparing two `strings` lexicographically. -### Expected output : +### Usage : ```console student@ubuntu:~/compareprog$ go build diff --git a/subjects/compareprog.fr.md b/subjects/compareprog.fr.md new file mode 100644 index 000000000..ebdaf7345 --- /dev/null +++ b/subjects/compareprog.fr.md @@ -0,0 +1,24 @@ +## compareprog + +### Instructions + +Écrire un programme qui se comporte comme la fonction `Compare`. + +Ce programme affiche un nombre après avoir comparé deux `strings` lexicalement. + +### Utilisation : + +```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$ +```