cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
Turbo C Code
Turbo C Code
Mar 8, 2012 at 2:55pm UTC
clampzy
(15)
Hi I want to know how to get the right code for example
224-123 = 101minutes
this is military time so I would like to know the code on how to output will get
224-123 = 61minutes. thanks!
Mar 8, 2012 at 3:38pm UTC
hamsterman
(4538)
If military time = hours*100 + minutes, then hours = military time/100 and minutes = military time%100. Once you have them separated, perform the operation on hours and minutes separately, and then reassemble them to minutes with hours*60+minutes.
Topic archived. No new replies allowed.