Browse Source

Update of doop

Added details and corrected unclearness
pull/104/head
Frenchris 6 years ago
parent
commit
c16238c54c
  1. 14
      subjects/doop.en.md

14
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. 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. `fmt.Print` is authorized.
### Usage Examples of outputs :
```console ```console
student@ubuntu:~/piscine/test$ go build doop.go student@ubuntu:~/piscine/test$ go build doop.go
@ -29,10 +31,10 @@ student@ubuntu:~/piscine/test$ ./doop 1 p 1
0 0
student@ubuntu:~/piscine/test$ ./doop 1 + 1 student@ubuntu:~/piscine/test$ ./doop 1 + 1
2 2
student@ubuntu:~/piscine/test$ ./doop 1 / 0 student@ubuntu:~/piscine/test$ ./doop 1 / 0 | cat -e
No division by 0 No division by 0$
student@ubuntu:~/piscine/test$ ./doop 1 % 0 student@ubuntu:~/piscine/test$ ./doop 1 % 0 | cat -e
No modulo by 0 No modulo by 0$
student@ubuntu:~/piscine/test$ ./doop 1 * 1 student@ubuntu:~/piscine/test$ ./doop 1 "*" 1
1 1
``` ```

Loading…
Cancel
Save