initial commits

master
Charles Iliya Krempeaux 2024-02-09 11:10:01 -08:00
parent 91e9ea5115
commit d95d73b49f
1 changed files with 12 additions and 0 deletions

12
dividebyzero.go 100644
View File

@ -0,0 +1,12 @@
package imgrow
func divideByZero(n int) int {
switch {
case 0 < n:
return intMax
case n < 0:
return intMin
default: // 0 == n
return 0
}
}