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
Determine if input is odd
Count from 0 to N^M in base N.
Is my wife right? Now with even more wrong husband
Wind Chill Computation
Tick. Tock. Tick. Tock. Tick. Tock. Tick. Tock. Tick. Tock.
Back to basics 18 - justification
Back to basics 19 - character types
2 b | ~ 2 b
Back to basics 20 - singleton dimensions
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