Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   help on turbo C. timeZ converter (http://www.go4expert.com/forums/help-turbo-c-timez-converter-t21263/)

 haru31773 9Mar2010 16:03

help on turbo C. timeZ converter

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

output:
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:

 haru31773 9Mar2010 16:06

Re: help on turbo C. timeZ converter

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

^^

 virxen 9Mar2010 16:25

Re: help on turbo C. timeZ converter

where is your code so far?

 haru31773 9Mar2010 16:32

Re: help on turbo C. timeZ converter

still working on it atm, but clueless,

 xpi0t0s 10Mar2010 18:06

Re: help on turbo C. timeZ converter

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:
Code:

```int i=0; i=5; // 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?

 haru31773 12Mar2010 17:31

Re: help on turbo C. timeZ converter

k bro ill try it , thx

 All times are GMT +5.5. The time now is 11:52.