}
printf(\ÊäÈëÎļþ·¾¶£º\scanf(\fp=fopen(filePath,\times=timeOfData(fp); ProcessAmount=times-2; while(i fclose(fp); if(i==0){ //ÕâÊÇÓÃÀ´½ÓÊÕÎı¾¸ñʽµÚÒ»Ðеĺº×Ö¡£ fscanf(fp,\fscanf(fp,\fscanf(fp,\fscanf(fp,\ //ÒÔÏÂÓÃÀ´½ÓÊÕ½ø³ÌÊý¾Ý }else{ } i++; fscanf(fp,\fscanf(fp,\fscanf(fp,\fscanf(fp,\ setNewPCB(name,pri,emt,st); void setNewPCB(char *name,int pri,int entime,int sertime){//¸³Öµ½¨Á¢PCB£¬ÓÃÓÚ´ÓÎı¾ÖлñÈ¡Êý¾Ý if(head==NULL){ head=newP; newP=(struct PCB1 *)malloc(sizeof(struct PCB1)); }else{ thisP=head; while(thisP->next!=NULL){ thisP=thisP->next; } } } thisP->next=newP; thisP=newP; thisP->No=SequenceNumber; SequenceNumber++; strcpy(thisP->name,name); thisP->priority=pri; thisP->enterMemoryTime=entime; thisP->serviceTime=sertime; thisP->next=NULL; int timeOfData(FILE *f){ //ÇóÈ¡´ÓÎı¾ÖлñÈ¡Êý¾ÝµÄ½ø³ÌÊýÁ¿ } void Menu(){ int flag=1; int se; while(flag){ //²Ëµ¥ char temp[20]; int i=0; if(f==NULL){ printf(\ÎļþûÓÐÕÒµ½¡£\\n\exit(0); }else{ } rewind(f); return i; while(fgets(temp,20,f)!=NULL){ } i++; printf(\ --------------12Èí¹¤3°à ³ÂÓî·æ ̸ÔóÓî------------\\n\ printf(\ -- ¾²Ì¬ÓÅÏÈȨÓÅÏÈËã·¨½ø³Ìµ÷¶È --\\n\ printf(\ ----------------------------------------------\\n\ } //¸ßÏìÓ¦±Èµ÷¶ÈËã·¨ int N; struct zgxyb *c; struct zgxyb{ } printf(\½ø³Ìµ÷¶ÈÄ£Äâ\\n\printf(\Í˳ö\\n\printf(\ÇëÑ¡Ôñ£º\scanf(\fflush(stdin); switch(se){ } SequenceNumber=1; StartCount=0; case 1:{ } break; buildProcess(); printf(\½ø³ÌÁÐ±í£º\ListAllPCB(head); run(); //Çå¿Õ»º³åÇø£¬ÓÃÓÚ½â¾öÊäÈë×Ö·û´®·¢ÉúËÀÑ»·µÄÎÊÌâ case 0: flag=0; break; default: printf(\ÇëÊäÈëÕýÈ·Ñ¡Ïî¡£\\n\\n\break; char name[10]; float arrivetime; float servicetime; float starttime; float finishtime; float zztime; float dqzztime; }; struct zgxyb a[100]; void input(struct zgxyb *p,int N) { int i; printf(\Çë·Ö±ðÊäÈë ½ø³ÌÃû µ½´ïʱ¼ä ÒªÇó·þÎñʱ¼ä:\\nÀýÈç: a 0 100\\n\for(i=0;i<=N-1;i++) { printf(\ÇëÊäÈëµÚ%d¸öµÄ½ø³ÌÐÅÏ¢:\\n\ scanf(\} } void Print(struct zgxyb *p,float arrivetime,float servicetime,float starttime,float finishtime,float zztime,float dqzztime,int N) {int k; printf(\ printf(\for(k=1;k {printf(\} printf(\µ±Ç°Ö´Ðнø³ÌÐÅÏ¢:\\n\ printf(\½ø³ÌÃû µ½´ïʱ¼ä ·þÎñʱ¼ä ¿ªÊ¼Ö´ÐÐʱ¼ä Íê³Éʱ¼ä ÖÜתʱ¼ä ´øÈ¨ÖÜתʱ¼ä\\n\ for(k=0;k<=N-1;k++) { printf(\etime,p[k].servicetime,p[k].starttime,p[k].finishtime,p[k].zztime,p[k].dqzztime); }