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 ```