|
|
@ -21,18 +21,18 @@ The program has to handle the modulo and division operations by 0 as shown on th |
|
|
|
### Usage |
|
|
|
### Usage |
|
|
|
|
|
|
|
|
|
|
|
```console |
|
|
|
```console |
|
|
|
student@ubuntu:~/piscine/test$ go build doop.go |
|
|
|
student@ubuntu:~/piscine-go/test$ go build doop.go |
|
|
|
student@ubuntu:~/piscine/test$ ./doop |
|
|
|
student@ubuntu:~/piscine-go/test$ ./doop |
|
|
|
student@ubuntu:~/piscine/test$ ./doop 1 + 1 | cat -e |
|
|
|
student@ubuntu:~/piscine-go/test$ ./doop 1 + 1 | cat -e |
|
|
|
2$ |
|
|
|
2$ |
|
|
|
student@ubuntu:~/piscine/test$ ./doop hello + 1 | cat -e |
|
|
|
student@ubuntu:~/piscine-go/test$ ./doop hello + 1 | cat -e |
|
|
|
0$ |
|
|
|
0$ |
|
|
|
student@ubuntu:~/piscine/test$ ./doop 1 p 1 | cat -e |
|
|
|
student@ubuntu:~/piscine-go/test$ ./doop 1 p 1 | cat -e |
|
|
|
0$ |
|
|
|
0$ |
|
|
|
student@ubuntu:~/piscine/test$ ./doop 1 / 0 | cat -e |
|
|
|
student@ubuntu:~/piscine-go/test$ ./doop 1 / 0 | cat -e |
|
|
|
No division by 0$ |
|
|
|
No division by 0$ |
|
|
|
student@ubuntu:~/piscine-go/test$ ./doop 1 % 0 | cat -e |
|
|
|
student@ubuntu:~/piscine-go/test$ ./doop 1 % 0 | cat -e |
|
|
|
No modulo by 0$ |
|
|
|
No modulo by 0$ |
|
|
|
student@ubuntu:~/piscine-go/test$ ./doop 1 "*" 1 |
|
|
|
student@ubuntu:~/piscine-go/test$ ./doop 1 "*" 1 |
|
|
|
1 |
|
|
|
1 |
|
|
|
``` |
|
|
|
``` |
|
|
|