Skip to content

Instantly share code, notes, and snippets.

@IamNator
IamNator / buyandsell_solution2.go
Last active July 1, 2021 11:54
solution to interview task
package main
import (
"fmt"
)
type Cement struct {
NoOfCement int
}
@IamNator
IamNator / buyandsell.go
Created July 1, 2021 11:38 — forked from ogaere/buyandsell.go
Tell me what is wrong with this of code
type Cement struct {
NoOfCement int
}
func (c *Cement) BuyCement(howmany int) {
c.NoOfCement += howmany
}
func (c *Cement) SellCement(howmany int) {
o.NoOfCement -= howmany