min = ready[0];if(last<0)continue;for(i=0;i<=last;i++){if(p[ready[i]].rem_time<p[min].rem_time)min=ready[i];}running = min;//Schedule a process and print the process that was scheduledprintf("\n\nTime:%-2d to time: %-2d Running Process: %d",time,time+1,running);time = time + 1;p[running].rem_time--;//Update the entry in the PCB