uses crt;
type countries=record
country: string[100];
pcount: real;
end;
const
N=9;
var
CountryPeople: array[0..N]of countries;
i,j: integer;
bufferC: string[30];
bufferp: real;
Begin
clrscr;
for i:=0 to N do
begin
writeln('Enter country');
readln(CountryPeople.country);
writeln('Enter people count of country');
readln(CountryPeople.pcount);
end;
for j:=0 to N-1 do
for i:=0 to N-j do
begin
if (CountryPeople[i+1].pcount>CountryPeople.pcount) then
begin
bufferC:=CountryPeople.country;
bufferP:=CountryPeople.pcount;
CountryPeople.country:=CountryPeople[i+1].country;
CountryPeople.pcount:=CountryPeople[i+1].pcount;
CountryPeople[i+1].country:=bufferC;
CountryPeople[i+1].pcount:=bufferP;
end;
end;
clrscr;
writeln ('Country':10,' ','People count':10);
for i:=0 to N do
begin
write(CountryPeople.country:10,' ');
writeln(CountryPeople.pcount:10:2);
end;
readkey;
end.
dXNlcyBjcnQ7IAp0eXBlIGNvdW50cmllcz1yZWNvcmQgCmNvdW50cnk6IHN0cmluZ1sxMDBdOyAKcGNvdW50OiByZWFsOyAKZW5kOyAKY29uc3QgCk49OTsgCnZhciAKQ291bnRyeVBlb3BsZTogYXJyYXlbMC4uTl1vZiBjb3VudHJpZXM7IAppLGo6IGludGVnZXI7IApidWZmZXJDOiBzdHJpbmdbMzBdOyAKYnVmZmVycDogcmVhbDsgCkJlZ2luIApjbHJzY3I7IApmb3IgaTo9MCB0byBOIGRvIApiZWdpbiAKd3JpdGVsbignRW50ZXIgY291bnRyeScpOyAKcmVhZGxuKENvdW50cnlQZW9wbGUuY291bnRyeSk7IAp3cml0ZWxuKCdFbnRlciBwZW9wbGUgY291bnQgb2YgY291bnRyeScpOyAKcmVhZGxuKENvdW50cnlQZW9wbGUucGNvdW50KTsgCmVuZDsgCgpmb3Igajo9MCB0byBOLTEgZG8gCmZvciBpOj0wIHRvIE4taiBkbyAKYmVnaW4gCmlmIChDb3VudHJ5UGVvcGxlW2krMV0ucGNvdW50PkNvdW50cnlQZW9wbGUucGNvdW50KSB0aGVuIApiZWdpbiAKYnVmZmVyQzo9Q291bnRyeVBlb3BsZS5jb3VudHJ5OyAKYnVmZmVyUDo9Q291bnRyeVBlb3BsZS5wY291bnQ7IApDb3VudHJ5UGVvcGxlLmNvdW50cnk6PUNvdW50cnlQZW9wbGVbaSsxXS5jb3VudHJ5OyAKQ291bnRyeVBlb3BsZS5wY291bnQ6PUNvdW50cnlQZW9wbGVbaSsxXS5wY291bnQ7IApDb3VudHJ5UGVvcGxlW2krMV0uY291bnRyeTo9YnVmZmVyQzsgCkNvdW50cnlQZW9wbGVbaSsxXS5wY291bnQ6PWJ1ZmZlclA7IAplbmQ7IAplbmQ7IAoKY2xyc2NyOyAKd3JpdGVsbiAoJ0NvdW50cnknOjEwLCcgJywnUGVvcGxlIGNvdW50JzoxMCk7IApmb3IgaTo9MCB0byBOIGRvIApiZWdpbiAKd3JpdGUoQ291bnRyeVBlb3BsZS5jb3VudHJ5OjEwLCcgJyk7IAp3cml0ZWxuKENvdW50cnlQZW9wbGUucGNvdW50OjEwOjIpOyAKCmVuZDsgCnJlYWRrZXk7IAplbmQu
prog.pas(18,22) Error: Illegal qualifier
prog.pas(20,22) Error: Illegal qualifier
prog.pas(26,45) Error: Illegal qualifier
prog.pas(28,24) Error: Illegal qualifier
prog.pas(29,24) Error: Illegal qualifier
prog.pas(30,15) Error: Illegal qualifier
prog.pas(31,15) Error: Illegal qualifier
prog.pas(41,21) Error: Illegal qualifier
prog.pas(42,23) Error: Illegal qualifier
prog.pas(46,4) Fatal: There were 9 errors compiling module, stopping
Fatal: Compilation aborted
Error: /usr/bin/ppc386 returned an error exitcode (normal if you did not specify a source file to be compiled)