1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

help on turbo C. timeZ converter

Discussion in 'C' started by haru31773, Mar 9, 2010.

  1. haru31773

    haru31773 New Member

    I GOT THIS very rush project , i nid to make a TIMEZONE converter program,

    it goes like this, u enter ur nations time. ex( philippines 9:00)< this must be constant.

    then the program converts the time and should display the different timezones of 10 different countries

    ex.( us:8;00 can: 8;30 ph 8;45 etc..)

    i have tried looping, but i just cant get right, i really nid ur suggestions.:freak:
  2. haru31773

    haru31773 New Member

    hen the program converts the time and should display the"EQUIVALENT" different timezones of 10 different countries

  3. virxen

    virxen New Member

    where is your code so far?
  4. haru31773

    haru31773 New Member

    still working on it atm, but clueless,
  5. xpi0t0s

    xpi0t0s Mentor

    Take it step by step and make sure each bit works before moving onto the next bit. Don't attempt to write the whole program in one go. Get the input from the user and convert it however you want, then display what you think you've got.

    If that's correct then move onto the next bit: if it's a loop, forget the loop for now and just do it for one thing, so having got the data for PH then do the conversion for US and display the result, and make sure that is correct before moving on. Bear in mind that you will be implementing a loop at some point, so maybe make the code dependent on what will be a loop variable:
    int i=0;
    // some code dependent on i, and eventually you will have:
    for (int i=0; i<10; i++)
        // some code dependent on i
    Then implement the loop. This bit should be fairly trivial once you've got the preceding steps worked out, and if I've read the problem description correctly then that should be it.

    When you get stuck post the complete code. It shouldn't be too long; I expect the whole of this program can be done in less than 50 lines of code. Make sure your code is indented correctly and uses sensible variable names, and use code blocks* to ensure the formatting is preserved.

    *which you know about, having read the posting guidelines, right?
  6. haru31773

    haru31773 New Member

    k bro ill try it , thx

Share This Page