CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2016
    Posts
    1

    Writing a code in military time, and then adding minutes the time i choose.

    Hello guys, i am a beginner in programming and i want to write a code for military time and then add minutes to it. In the end i want it to show the original time and then the time after the minutes added!! i would seriously appreciate it if someone showed me a code as an example so i can check the logic and try to understand it. Especially the part where i have to prevent 23:50 hours from going 24:20 if i add 30 minutes...
    as an example, when i run the program i want it to be something like this:

    Enter a time in the format hour:minute

    2:30

    The time 50 minutes after 2:30 will be 3:20

    thanks alot

  2. #2
    Join Date
    Jun 1999
    Location
    Eastern Florida
    Posts
    3,877

    Re: Writing a code in military time, and then adding minutes the time i choose.

    Start by doing it manually so you see what steps the program needs to do.
    How did you get 3:20 from 2:30?
    Norm

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured