24

Being a programmer... ;)

Comments
  • 0
    Hmmm. I am split whether he should have brought six or seven bottles of milk.
  • 0
    @nickhh I think 6 because I didn't see a plus or a and clause.

    To me it will be like this.

    milk = 1;

    if (hasEggs){
    milk = 6;
    }

    return milk;

    So the second milk variable would overwrite the first since it will be the same variable.
  • 0
  • 0
    My interpreter parsed it like this:

    buy_milk 1

    if hasEggs
    buy_milk 6
    end

    7 total
Add Comment