Problem 304. Bottles of beer
The correct answer should be always 0, :)
If zero is the number that's input into the function, you end up with -1 bottles of beer on the wall?
Negative beer amounts? Oh dear
Negative amounts of beer? Means you are drunk then:)
Do you seriously require a matlab program to solve this?:/
Problem worth solving.
Beer all the way..Cheers..!!
could be a bit more challenging...
For instance, why don't calculate the statistic probabillity how many beer is drunk by male & female party people during one night. With exponential increasing amount of drunken beer in the later hours... ;-)
Solution CommentsShow comments
Problem Recent Solvers2090
Remove the two elements next to NaN value
More from this Author39
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!