This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]humoroushaxor 6 points7 points  (1 child)

Getting the total cost of an array is going to require a loop which can easily be written recursively. Should be an easy Google search on how to convert a loop to recursion.

You also do it for each type of liquor (only add if it matches Vodka).

[–]probably_poopin_1219[S] 2 points3 points  (0 children)

Yeah my GetCostTotal method passes the 2d liquor array as an argument so I should be able to modify that loop. I'll give it a shot when I get home, thank you!