cout< for(i=0;i cout< ege< } } } //FIFO算法 void FIFO() { int i; int current_hour; int current_minute; int total_time=0; //輸出作業流 cout< cout< cout<<"---------------------------------------------------------------"< cout.setf(2); cout< current_hour=jobs[0].reach_hour; current_minute=jobs[0].reach_minite; for(i=0;i jobs[i].start_time=current_hour*100+current_minute; jobs[i].wait_time=(current_hour-jobs[i].reach_hour)*60+(current_minute-jobs[i].reach_minite)+jobs[i ].need_time; cout< time< current_hour=current_hour+(jobs[i].need_time+current_minute)/60; [1] [2] [3] [4] [5] [6] [7] [8] [9]
From:http://tw.wingwit.com/Article/program/czxt/201311/24021.html