Help please - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Help please

zmajzmaj Posts: 2Member
program ro;
uses wincrt;
type
slog=record
ime:string;
staz:integer;
staz_uro:integer
end;
type
niz=array[1..30] of slog;
var
radnik:niz;
pom:slog;
n,i,j:integer;
procedure razmeni(var p,q:integer);
var pom:integer;
begin
pom:=p;
p:=q;
q:=pom
end;
begin
write('unesi broj radnika:');
readln(n);
writeln('unesi podatke o radnicima:');
for i:=1 to n do
begin
with radnik[i] do
begin
write('Ime '); readln(ime);
write('Ukupan radni staz ');
readln(staz);
write('Staz u radnoj organizaciji ');
readln(staz_uro);
writeln
end
end;
for i:=1 to n-1 do
for j:=i+1 to n do
if radnik[i].staz< radnik[j].staz then
razmeni(radnik[i], radnik[j]);
writeln('Sortirani podaci po ukupnoj duzini radnog staza:');
for i:=1 to n do
with radnik[i] do
begin
writeln('Ime: ',ime);
writeln('Ukupan staz: ',staz);
writeln('Staz u radnoj organizaciji: ',staz_uro);
writeln
end;
writeln;
writeln('Imena radnika sa 10 god radnog staza_uro: ');
for i:=1 to n do
if radnik[i].staz_uro=10 then writeln (radnik[i].ime);
end.



Error 26 type missmatch in this line
razmeni(radnik[i], radnik[j]);
Sign In or Register to comment.