GIDForums  

Go Back   GIDForums > Computer Programming Forums > CPP / C++ Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 16-Jun-2004, 22:24
gaurav_sting gaurav_sting is offline
Invalid Email Address
 
Join Date: Jun 2004
Posts: 2
gaurav_sting is on a distinguished road

number of hours between 2 dates


hi everyone,

i am not been able to calculate the number of hours between 2 dates, but there is a condition that 2 days of the week are off (not working hours i.e. saturday and sunday), so these two days shud not be included.

i am a newbie in C language, plz help me with the code.

Thanks alot
Gaurav
  #2  
Old 16-Jun-2004, 22:36
aaroncohn's Avatar
aaroncohn aaroncohn is offline
Regular Member
 
Join Date: Feb 2004
Location: Bay Area, CA.
Posts: 564
aaroncohn is a jewel in the roughaaroncohn is a jewel in the roughaaroncohn is a jewel in the rough
Do you have some pseudo code written up? If you show me the pseudo code, I can help you write the program in C.
__________________
-Aaron
  #3  
Old 16-Jun-2004, 23:15
aaroncohn's Avatar
aaroncohn aaroncohn is offline
Regular Member
 
Join Date: Feb 2004
Location: Bay Area, CA.
Posts: 564
aaroncohn is a jewel in the roughaaroncohn is a jewel in the roughaaroncohn is a jewel in the rough
I'll give you a few hints:
  • There are 24 hours in a day
  • Each month has a certain number of days
  • The amount of days in February changes on a leap year
  • If you know what day the year started on, you can find out the day of any date in the year.

And one tip you shouldn't forget:
Programming isn't rocket science, but it sure can feel like it if you aren't prepared before you start coding. It's always best to figure out the best way to solve the problem before you start writing code. If you start a program by writing code, you may find it much harder to get started, or you may easily get stuck or lost. ALWAYS PLAN YOUR PROGRAM BEFORE YOU START CODING.
__________________
-Aaron
 
 

Recent GIDBlogA Week in Kuwait by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using an array and finding the element number (subscript) tommy69 C Programming Language 27 05-Apr-2004 12:23
Breaking the number into two digits amir_b C Programming Language 3 16-Feb-2004 12:28
c: array comparison jack C Programming Language 7 26-Jan-2004 11:21
Random() : Make each number onlu appear once NiXeN CPP / C++ Forum 3 13-Jan-2004 04:47
How to find the last 6 digits of a 8 digit number? rjd72285 CPP / C++ Forum 3 28-Oct-2003 08:21

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 22:03.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.