标签:
#include<stdio.h> #define N 50 main() { int i,n,z,k,f=0,runtime,status; int reqtime[N],priority[N]; char name[N]; printf("输入进程数:"); scanf("%d",&n); printf("输入每个进程的name,reqtime,priority:\n"); for(i=0;i<n;i++) { scanf("%s",&name[i]); scanf("%d",&reqtime[i]); scanf("%d",&priority[i]); } printf("----------------------------------------------\n"); printf("name \t reqtime \t priority \t\n"); for(i=0;i<n;i++) { printf("%c \t %d \t\t %d \t\n",name[i],reqtime[i],priority[i]); } /* for(z=0;z<n;z++) { for(k=1;k<n;k++) { if(priority[z]<f) { } } */ }
标签:
原文地址:http://www.cnblogs.com/leon-pang/p/4502529.html