From c16238c54c5264c0114beef96c433c2a29306032 Mon Sep 17 00:00:00 2001 From: Frenchris <34804391+Frenchris@users.noreply.github.com> Date: Sat, 27 Apr 2019 00:14:53 +0100 Subject: [PATCH] Update of doop Added details and corrected unclearness --- subjects/doop.en.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/subjects/doop.en.md b/subjects/doop.en.md index b26aa208..60c809d0 100644 --- a/subjects/doop.en.md +++ b/subjects/doop.en.md @@ -14,9 +14,11 @@ In case of an invalid entry the programs prints `0`. In case of an invalid number of arguments the program prints nothing. +The program has to handle the modulo and division by 0 as shown on the output examples below. + `fmt.Print` is authorized. -### Usage +Examples of outputs : ```console student@ubuntu:~/piscine/test$ go build doop.go @@ -29,10 +31,10 @@ student@ubuntu:~/piscine/test$ ./doop 1 p 1 0 student@ubuntu:~/piscine/test$ ./doop 1 + 1 2 -student@ubuntu:~/piscine/test$ ./doop 1 / 0 -No division by 0 -student@ubuntu:~/piscine/test$ ./doop 1 % 0 -No modulo by 0 -student@ubuntu:~/piscine/test$ ./doop 1 * 1 +student@ubuntu:~/piscine/test$ ./doop 1 / 0 | cat -e +No division by 0$ +student@ubuntu:~/piscine/test$ ./doop 1 % 0 | cat -e +No modulo by 0$ +student@ubuntu:~/piscine/test$ ./doop 1 "*" 1 1 ```