Thread: Time conversion

  1. #1
    Registered User
    Join Date
    Jan 2011

    Time conversion

    can anybody helps me, please?
    Write a program to convert from 12-hour time format to 24-hour time format. The 12-
    hour format has the form hours:minutes followed by either A, P, AM, or PM (either lower
    case or upper case but not mixed). One white space is allowed but not required between
    the numerical time and the AM/PM indicator. The 24-hour format must be printed with
    leading zeros, to ensure that a 24-hour time always consists of four digits. The output
    line is followed by a new-line character.

  2. #2
    Registered User
    Join Date
    Nov 2010
    Long Beach, CA
    Here's a tip to get you started: read the homework policy.

    Then, make a decent effort to do this on your own. If you still have problems, come back, post your code (in code tags) and ask specific questions.

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    Cross-posted here as well (broadcast homework - yummy)
    programming a program? - C

    How To Ask Questions The Smart Way
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Partition and scheduling HW/SW help!
    By thangdc01_02 in forum C++ Programming
    Replies: 3
    Last Post: 11-18-2010, 02:07 PM
  2. Help fixing a compile time error
    By matt_570 in forum C Programming
    Replies: 2
    Last Post: 09-05-2009, 09:36 PM
  3. military time to integer conversion
    By arceeflores in forum C Programming
    Replies: 6
    Last Post: 08-12-2009, 08:03 AM
  4. Read and set\change system time
    By Hexxx in forum C++ Programming
    Replies: 9
    Last Post: 01-02-2006, 07:11 AM
  5. time class
    By Unregistered in forum C++ Programming
    Replies: 1
    Last Post: 12-11-2001, 10:12 PM