1 2003

= =




1. , .

data.prb

program file_out ;

var f:file of integer; i,x:integer;

begin

assign(f,'data.prb'); ( )

rewrite(f); (
)

for i:=1 to 10 do
begin read(x);
write(f,x); ( )
end;

close(f); ( )

end.

data.prb

program file_in;

var f:file of integer; i:integer;
x:array[1..10] of integer;

begin

assign(f,'data.prb');

reset(f); ( )

for i:=1 to 10 do

begin read(f,x[i]); ( )
write(x[i],' ');
end;

close(f);

end.

2. .

( ) . , .

: var f:text;

:
eof(f); - true, .

:
eoln(f); - true, .

, .. read(f,v),
v:char v;
v:string[n] n v;
v:integer , , v.

 

:

. . .

 

program asd;

var n:longint;

a:string;{a:integer;}

st,n1:string;

input,output:text;

i,i1:integer;

f: array[1..200] of longint;

begin

f[1]:=1;f[2]:=1;

assign(input,'z2.dat');

reset(input);

assign(output,'z2.rez');

rewrite(output);

while not eof(input) do

begin

readln(input,n1); val(n1,n,i1); {readln(input,n);}

if (n=1) or (n=2)

then str(1,a) {a:=1;}

else for i:=3 to n do f[i]:=f[i-2]+f[i-1];

str(f[n],a); {a:=f[n];}

writeln (output,a);

end;

close(input);

close(output);

end.

 

.

program in_text_file;

uses crt;

var f : text;

a : string;

b : char;

i,c,q,p : integer;

 

begin

clrscr;

assign(f,'111.txt');

reset(f);

a:='';b:='e';c:=0;p:=0;

repeat

repeat

read(f,b);

if (ord(b)>47) and (ord(b)<58)

then

begin if c=0 then a:=b else a:=a+b; c:=1;p:=1; end

else

begin c:=0;

if p=1 then begin val(a,i,q); writeln(i);p:=0;end;

end;

until eoln(f);

until eof(f);

close(f);

end.

 

 



 

: WWS corporation & ROKI company.