You are on page 1of 1

Assignment No. 2 //write a c program for FCFS Scheduling Algorithm #include<stdio.

h> main() { int pro1,pro2,pro3,a,b,c,d; printf("\n Enter the Values of Process1, Process2, Process3"); scanf("%d%d%d",&pro1,&pro2,&pro3); printf("\n Waiting time for p1=0\n"); printf("\n Waiting time for p2=%d\n",pro1); printf("\n Waiting time for p3=%d\n",pro1+pro2); a=pro1+pro2; b=a/3; printf("average witing time =%d\n",b); c=pro1+pro2+pro3;d=c/3; printf("average turn arround time=%d\n",d); return(0);}

You might also like