#include int main(){ int i,init,np,dir,temp,size,totalDisk,req[50]; printf("Enter the number of process : "); scanf("%d",&np); printf("Enter the request sequence : "); for(i=0;ireq[j+1]){ temp=req[j]; req[j]=req[j+1]; req[j+1]=temp; } } } int point=init; for(i=0;ipoint){ point=req[i-1]; break; } } if(!dir){ totalDisk=(size-init)+(point)+size; } else{ totalDisk=(init+req[np-1]); } printf("The total disk movement : %d\n",totalDisk); return 0; }