Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main
- import "fmt"
- func main() {
- var x1, y1, x2, y2, x, y float64
- fmt.Scanln(&x1)
- fmt.Scanln(&y1)
- fmt.Scanln(&x2)
- fmt.Scanln(&y2)
- fmt.Scanln(&x)
- fmt.Scanln(&y)
- var firstCondition = (x == x1 || x == x2) && (y >= y1 && y <= y2)
- var secondCondition = (y == y1 || y == y2) && (x >= x1 && x <= x2)
- if(firstCondition || secondCondition){
- fmt.Println("Border")
- } else {
- fmt.Println("Inside / Outside")
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement