My code is 99% complete but it doesn't print out the correct output. I know there is a simple problem here that I'm going to bang my head over, but I just can't find it.
Here's my code: C code - 149 lines - codepad
Here's a Gantt Chart that i did in excel to predict my output:
Here's the input I've been using for this example along with the output of the program:
As you can see, according to my Gantt chart, the second process to run should be P3, but the program I wrote picks P4. I've been over it many times and I know it has to be something simple, I just can't find it.
If anyone can help enlighten me, I would be eternally grateful.
Thank you very much.