Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and pass it around.
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... ;-)
It is weird that I've been wrong for twice.
This user (mohamed elbesealy) appears to have gamed the system, with fraudulent "likes" of this unremarkable solution submitted by 'sock-puppet' accounts. —DIV
what is the problem in my solution? why it is showing error.
output is named 'remaining' and not 'y'
Did I miss the twist?
D: What the ...
Hooray BEER! :D
Who Has the Most Change?
How many trades represent all the profit?
Find nearest prime number less than input number
Replace multiples of 5 with NaN
Matlab Basics II - squares
Convert Roman to Arabic Numerals
Back to basics 10 - Max Float
2 b | ~ 2 b
Back to basics 19 - character types
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office