C program

By katmandu
Feb 19, 2006
  1. Hello brothers, hey could anybody pleaser help me out. I need to write a program in C language that converts time from 24 hours notation to 12 hour notation, and Im sort of lost, Id appreciate from the heart your help.

    This is what I should get, for instace, inputa time as two integers: 14 25
    anf my outpu should be: that is 2 25 in 12 hour notation.

    Please help.
  2. katmandu

    katmandu TS Rookie Topic Starter


    Nodsu, I appreciate it, that should be enough.

    God bless,

    Katmandu :hotouch:
  3. Nodsu

    Nodsu TS Rookie Posts: 5,837   +6

    Schoolwork, eh?

    Not going to write the whole program.. This is the beef that actually does the "conversion". If you don't understand what this is or does, then you need to read up on basics of C..

    int toTwelve(int hour)
       if(hour > 12)
          return(hour - 12);
Topic Status:
Not open for further replies.

Similar Topics

Add your comment to this article

You need to be a member to leave a comment. Join thousands of tech enthusiasts and participate.
TechSpot Account You may also...