Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main
- import "fmt"
- func main() {
- var a, b, c, d, counter int
- fmt.Scanln(&a)
- fmt.Scanln(&b)
- fmt.Scanln(&c)
- fmt.Scanln(&d)
- for k := a; k < 9; k++ {
- for l := 9; l >= b; l-- {
- for m := c; m < 9; m++ {
- for n := 9; n >= d; n-- {
- if k % 2 == 0 && m % 2 == 0 && l % 2 == 1 && n % 2 == 1 {
- if k == m && l == n {
- fmt.Println("Cannot change the same player.")
- } else {
- fmt.Printf("%d%d - %d%d\n", k, l, m, n)
- counter++
- if counter == 6 {
- return
- }
- }
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement