in reply to time diff in minutes
12:45 is not 1245 minutes, so you clearly can't just use subtraction. You need to get the actual number of minutes first. (12*60+45 = 765)
Then you have to figure out whether 1:50 means 1:50 am or pm (aka 13:50). Also, what day is it?
The trick to these homework problems is to break it down into all the little steps that you don't realize you're doing when you do it manually. Once you've written down the steps (don't skip anything!), you can then convert that into code that the computer can run.
|
|---|