Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

2)Sraplut irst cosl irt r

wtL0
(or(int iss :io:tt)
wECJbli-13 tuDt Li-40%

orl int iz0 2i4n 2i4+)i


tat Ci3= bLi3tEL13
3

ed indascTimelinE (rrowssL intnrto, int brL])2


ik wto], tarn3,toral-tt, totaL tat :0

unaTutnAround TireLfeto wses, , bit,ut, tot;


orlint iz0; ian: itr){
totolwt tutal-wt t t Li3'
tatEiJ ):
odlo',
orinell"

(Hoat) totalwt/(uoat) ni
int 6 total tar / (yoat) ni
int t:Hoat)
mnoel" Aerag oaitng
rintlc"In): Hou lod', t):
Tusn around
minell Avvaq

int burst Hme IJ$10,5, 8:


4ind awg Time (procues, , bur st-Hn)

’9utput'
Prouss wT TAT
10
2 16
15 23
tin 8
burnarondd tine L6
iko;it+) i=p1 Lint for
e -tmul],
int bursk intn
inmocsa
k I, t nbaiinqimu
(int
woic
3
1])¬burstLj-+tionaj3>bur
mu
ti t (i4
;+t) -1; is0 ieo: lint for
burst-hime
nint LJ, inseALJ,
t ro Cint Bort uedi
steli0. ttindud
algontan. bludling hirt job test SharSmydmnt b)2)
Tinlint moossesLD int burst. tie LJ,
fineTurnaround
he waitinq-tme I], int turnaround hmeLJ, intn)
uoid

n-ti LiJtburße
tusnaroun d tieLiJ

void 4in AverageTine Cint rowACJ, int burktin C), int n)


ink voaltin q-ti ne LnJ burn aroun d tim Lnl:
turnarondtim,n
bortl mouses, bur st_Hhe, wwauhngtime, tuatound
Hoat totol-oaihingti 30, totol-tun around time 20;

totalwaiting- time
to tol- turnaroGndl Lh'et turnaron dtie Li
=
fo d\t\t olo d\o', ro cues Ci3,
burst HhLi), woaihn-finuLiJ, hunaroun d im ra)

Hot asLCO.a -waiHng-te etotal oating-im In


Hoat awerlaL. tunoroundtime =total-turnar ouno tiou Int

rrtnl( Areragu Turn aroundl time ::l.n',


aeragr-turnarond
3
iot moinc

int ossLn, DurstteLn

rtinl"5nkr burst time for roun'led i",irdds

3
HocAVeraguTimelouse bur &ttime, ;

’9utput:

Isnle e bur st tire or oo


BT 8130
1 10
1o

30 30 60

You might also like