Here I have got the code part which counts the difference between two times(time1,time2). How can I add seconds to it and convert 60sec to one minute?
I assume there is a simpler way to deal with it, but I am studying with book for beginners so I'd like to get the answer in the same way as the hours and minutes are calculated here.
hours=time2/100-time1/100;
mins=time2%100-time1%100;
hours=mins>0?hours:hours-1;
mins=mins>0?mins:mins+60;