Исходники и презентации
This commit is contained in:
12
lessons/errors/division_by_zero_float/main.go
Normal file
12
lessons/errors/division_by_zero_float/main.go
Normal file
@ -0,0 +1,12 @@
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
func divide(lhs, rhs float32) float32 {
|
||||
return lhs / rhs
|
||||
}
|
||||
|
||||
func main() {
|
||||
result := divide(1000, 0)
|
||||
fmt.Println(result)
|
||||
}
|
||||
Reference in New Issue
Block a user