在输入多位名称或者编号后,如何让这里不错行
void Output()
{
int i;
float turn_round_T=0,f1,w=0; //f1是周转时间 w是平均带权周转时间
printf("\n|进程名称|进程编号|优先级|到达时间|运行时间|开始时间|结束时间|运行次序|周转时间|\n");
for(i=0;i<counter;i++)
{
f1=PCB[i].run_end_T-PCB[i].come_T;
turn_round_T=turn_round_T+f1;
w=w+(f1/PCB[i].run_T);
printf("| | | | | | | | | |\n");
printf("| %s | %d | %d | %5.2f | %5.2f | %5.2f | %5.2f | %d | %5.2f |\n",
PCB[i].name,PCB[i].number,PCB[i].priority,PCB[i].come_T,PCB[i].run_T,PCB[i].run_begin_T,PCB[i].run_end_T,PCB[i].order,f1);
}
printf("\n *****平均周转时间为:%5.2f",turn_round_T/counter);
printf("\n *****平均带权周转时间为:%5.2f",w/counter);
}