- 8


next k

k< Nmo N := k-1 if k < N then N = k-1

return

 

N , , .

 

ostatok: '

'

- restore osts

k = 1 N for k = 1 to N

meue(tv(k),c(k),p(k)) read tv$(k),c(k),p(k)

tv(k) = if tv$(k) = then exit for

(tv(k),c(k),p(k)) ? tv$(k);c(k);p(k)

next k

k < N mo N := k-1 if k < N then N = k-1

return

 

, , :

 

vyruch: '

'

S := 0 S = 0

k = 1 N for k = 1 to N

S := S+(c(k)-s(k)) *(m(k)-p(k)) S = S+(c(k)-s(k))*(m(k)-p(k))

next k