Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with code in C :(
#4
Yes, that is the problem.
The best way to fix it would be to change daysToNextThursday so it accepts the dayofweek as its (only) input argument. You compute that in your main program, so just pass it on.
If you are not allowed to change the function interfaces, then you must call the dayofWeek function again, from inside daysToNextThursday, to get that value.

Good luck.
Reply


Messages In This Thread
Problem with code in C :( - by Kashimiya - 2011-03-26, 06:32 AM
Problem with code in C :( - by SaptaZapta - 2011-03-26, 06:37 AM
Problem with code in C :( - by Kashimiya - 2011-03-26, 06:46 AM
Problem with code in C :( - by SaptaZapta - 2011-03-26, 06:59 AM
Problem with code in C :( - by Fiel - 2011-03-26, 08:08 PM
Problem with code in C :( - by Kashimiya - 2011-03-27, 02:01 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)