Priority Scheduling
Priority Scheduling
Priority Scheduling
#include<stdio.h>
main()
//clrscr();
scanf("%d",&n);
for(i=0;i<n;i++)
p[i] = i;
for(i=0;i<n;i++)
for(k=i+1;k<n;k++)
temp=p[i];
p[i]=p[k];
p[k]=temp;
temp=bt[i];
bt[i]=bt[k];
bt[k]=temp;
temp=pri[i];
pri[i]=pri[k];
pri[k]=temp;
wtavg = wt[0] = 0;
for(i=1;i<n;i++)
for(i=0;i<n;i++)
getch();