操作系统,最佳算法 部分代码 for (int i = 0; i != 5; ++i) { struct PCB *p = (struct PCB*)malloc(sizeof(struct PCB)); printf("进程号No.%d:\n", i); printf("输入进程名:"); scanf("%s", p->p_name); printf("输入进程运行时间:"); scanf("%d", &p->p_needTime); p->p_runTime = 0;