Howdy, Stranger!

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

Sign In with Facebook Sign In with Google Sign In with OpenID

Categories

We have migrated to a new platform! Please note that you will need to reset your password to log in (your credentials are still in-tact though). Please contact lee@programmersheaven.com if you have questions.
Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

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.