Program pb1;



program problema1;

type vector=array[1..30] of string;

var f,g:text;

v1,v2:vector;

i,j,n,m,p,nr:byte;

procedure citire(var f:text;var v:vector; var n:byte);

begin

n:=0;

while not eof(f) do

begin

n:=n+1;

readln(f,v[n])

end

end;

begin

assign(f,'bac1.txt');

reset(f);

assign(g,'bac2.txt');

reset(g);

write('p=');readln(p);

citire(f,v1,n);

citire(g,v2,m);

close(f);

close(g);

i:=1;

j:=1;

nr:=1;

while (iw[j].prenume then

begin

aux:=w[i];

w[i]:=w[j];

w[j]:=aux

end;

for i:=1 to k do

writeln(f,w[i].nume,' ',w[i].prenume,' ',w[i].tel);

close(f);

end.

program problema17;

type elev=record

nume:string[40];

clasa:string[3];

punctaj:byte

end;

var f:text;

v:array[1..20] of elev;

n,i,j,max:byte;

aux:elev;

s:string;

er:integer;

begin

assign(f,'part.txt');

reset(f);

readln(f,n);

max:=0;

for i:=1 to n do

begin

readln(f,s);

v[i].nume:=copy(s,1,pos(' ',s));

delete(s,1,pos(' ',s));

v[i].nume:=v[i].nume+copy(s,1,pos(' ',s)-1);

delete(s,1,pos(' ',s));

v[i].clasa:=copy(s,1,pos(' ',s)-1);

delete(s,1,pos(' ',s));

val(s,v[i].punctaj,er);

if max ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download