From 7189b3656dea345842fe1d9dd3b36cc001e8cf04 Mon Sep 17 00:00:00 2001 From: MSilva95 Date: Tue, 26 Nov 2019 12:02:33 +0000 Subject: [PATCH] add cases of overflow --- subjects/doop.en.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/subjects/doop.en.md b/subjects/doop.en.md index 3f362370b..ece1b0783 100644 --- a/subjects/doop.en.md +++ b/subjects/doop.en.md @@ -10,6 +10,8 @@ The program has to be used with three arguments: - An operator - Another value +You should use `Int64`. + The following operators are considered valid: "+", "-", "/", "*", "%". In case of an invalid operator the programs prints `0`. @@ -39,6 +41,10 @@ student@ubuntu:~/piscine-go/test$ ./doop 1 % 0 | cat -e No Modulo by 0$ student@ubuntu:~/piscine-go/test$ ./doop 9223372036854775807 + 1 Overflow +student@ubuntu:~/piscine-go/test$ ./doop -9223372036854775809 "*" 3 +Overflow +student@ubuntu:~/piscine-go/test$ ./doop 9223372036854775807 "*" 3 +Overflow student@ubuntu:~/piscine-go/test$ ./doop 1 "*" 1 1 student@ubuntu:~/piscine-go/test$ ./doop 1 "*" -1