Skip to main content

Timeline for ATM Console Program

Current License: CC BY-SA 3.0

11 events
when toggle format what by license comment
Oct 19, 2015 at 0:20 comment added RubberDuck Yeah @Shadow. I know. I later convinced myself that once you get passed 30, anything that is a multiple of 10 must also either be a multiple of 20 or 50 (possibly both). But it's not an intuitive implementation and I would ask any junior to provide a rigorous mathematical proof of it before letting it into production code. TL;DR: Don't be clever. Do the obvious and simple thing.
Oct 19, 2015 at 0:05 comment added Shadow @RubberDuck 20 and 50 are both divisible by 10. I check if it is divisible by 10 so if they enter say $25 it will tell them that it is invalid input because there are no $5 notes in the ATM
Oct 18, 2015 at 20:01 history tweeted twitter.com/StackCodeReview/status/655836235605385217
Oct 18, 2015 at 15:04 answer added Paritosh timeline score: 2
Oct 18, 2015 at 13:55 answer added Fernando Matsumoto timeline score: 3
Oct 18, 2015 at 12:43 comment added RubberDuck Right, but you don't check to see if it's a multiple of 20 or 50, you check to see if it's a multiple of 10. I smell a bug.
Oct 18, 2015 at 12:43 answer added Mast timeline score: 5
Oct 18, 2015 at 12:26 comment added Shadow @Mast where I live you can't withdraw $30 from an ATM because they only stock $20 and $50 notes. Also I could easily add a way to track notes and give appropriate output if there's not enough left in the machine, but the main point I'd like to get feedback on is the algorithm
Oct 18, 2015 at 12:21 comment added Mast Where does it keep track of the amount of notes still in storage? If it only contains notes of 20 and 50, how do I get $30 from it? The minimum is 20 but 30 is invalid? That seems like an odd design choice.
Oct 18, 2015 at 12:14 history edited Paritosh CC BY-SA 3.0
no need to mention it
Oct 18, 2015 at 12:08 history asked Shadow CC BY-SA 3.0