mirror of https://github.com/01-edu/public.git
Final update
This commit is contained in:
parent
c16238c54c
commit
97a98c801a
|
@ -10,11 +10,11 @@ The program has to be used with three arguments:
|
|||
- An operator
|
||||
- Another value
|
||||
|
||||
In case of an invalid entry the programs prints `0`.
|
||||
In case of an invalid operator 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.
|
||||
The program has to handle the modulo and division operations by 0 as shown on the output examples below.
|
||||
|
||||
`fmt.Print` is authorized.
|
||||
|
||||
|
@ -25,8 +25,8 @@ student@ubuntu:~/piscine/test$ go build doop.go
|
|||
student@ubuntu:~/piscine/test$ ./doop
|
||||
student@ubuntu:~/piscine/test$ ./doop 1 + 1
|
||||
2
|
||||
student@ubuntu:~/piscine/test$ ./doop hello + 1
|
||||
0
|
||||
student@ubuntu:~/piscine/test$ ./doop hello + 1 | cat -e
|
||||
0$
|
||||
student@ubuntu:~/piscine/test$ ./doop 1 p 1
|
||||
0
|
||||
student@ubuntu:~/piscine/test$ ./doop 1 + 1
|
||||
|
|
Loading…
Reference in New Issue