Answer: 30 cans (buy them by the six-pack; so you'd buy 5 six-packs)
==============================================================
Step-by-step explanation:
Let's say you buy six-packs only. Divide the amount of money you have over the cost per six-pack.
15/(2.59) = 5.7915 which rounds down to 5.
If you buy six-packs only, then you can buy a max of 5 of them. That gets you 5*6 = 30 cans of soda.
-------------
Now let's say you buy individual cans only. We'll use the same idea mentioned earlier but this time divide over 0.80
15/(0.80) = 18.75 which rounds down to 18
We round down because we can't buy that 19th can of soda (note how 19*0.80 = 15.2 which is larger than 15).
So if you buy individual cans only, then you can get a max of 18 cans.
We see that it's better to go with the six-pack option (in the first section) since we can get 30 cans compared to 18 cans.