package main

import (
	"fmt"
)

type Account struct {
	balance int
}

func transfer(amount int, from *Account, to *Account) {
	if from.balance >= amount {
		from.balance -= amount
		to.balance += amount
	}
}

func main() {

	account1 := Account{100}
	account2 := Account{100}

	for i := 0; i < 100; i++ {
		transfer(1, &account1, &account2)
		transfer(1, &account2, &account1)
	}

	fmt.Println("Account1 Balance = $", account1.balance)
	fmt.Println("Account2 Balance = $", account2.balance)

}
