Browse Source

Update of doop

Added details and corrected unclearness
content-update
Frenchris 5 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.
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
```

Loading…
Cancel
Save