: -Ô. - 3


P2 = integer

Pole, Pole1 = string

predicates

vvod

put

clouses

put if

write ( ),

readint (Pr),

Pr=0

vvod

vvod if

write ( ),

readln (Pole), nl,

write (Pole),

concat (Pole, \n, Pole1),

openappend (ff, text)

writedevice (ff),

write (pole1),

closefile (ff),

writedevice (screen),

write ( , Pole1, )

.. -, . . - , - . . , - tmc

tmc ( Post, Kod, Kol, Cena)

2.

domains

file = ff

data= tmc ( Post, Kod, Kol, Cena)

Post,Kod=string

Kol, Cena=integer

predicates

put

spr

clouses

put if

not (eof (ff)),

spr.

put if

eof(ff),nl,

write ( ),

closefile (ff)

spr if

readterm (data, tmc (Post, Kod, Kol, Cena), nl,

write (post), nl,

put.

goal

openread (ff, text),

readdevice (ff),

spr.

3.

domains

file=ff

Pr= integer

Pole, Pole1 = string

K = real

predicaes

put

mod

clouses

put if

write ( ),

readint (P2),

p2 = 0,

mod.

mod if

write ( ), nl,

readreal (K), nl,

K1=K*12,

openmodify (ff, text),

readdevice (ff),

48

filepos (ff,K1,0)

readln (Pole),

write ( , pole), nl,

writedevice (ff),

filepos (ff,K1,0),

write (Pole1,\n),

closefile (ff),

writedevice (screen),

write ( , Pole1), nl,

readdevice (keybord),

put

goal

mod