Sobes.tech
Junior — Senior

What output will the console display when running program №78

livecode

Task condition

Determine what text will appear in the console after executing the following Go code.

package main

import "fmt"

type customer struct{
    balance float64
}

func (cust customer) add(delta float64){
    cust.balance += delta
}

func main() {
    usr := customer{balance: 100.}
    usr.add(50.)
    fmt.Printf("balance: %.2f\n", usr.balance)
}