Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted by manequin ( 15 years ago )
program tb;
uses crt;
type element = array[2] of real;
type tablica = array[100] of element;
var tab:tablica;
ilosc : integer;
tempelement : element;
input : real;
begin
readln(ilosc);
for i := 0 to ilosc-1 do
begin
writeln('podaj r');
readln(input);
tab[i][0] := input;
writeln('podaj i');
readln(input);
tab[i][1] := input;
end
for i := 0 to ilosc-2 do
begin
for j := i to ilosc-2 do
begin
if tab[i][1] < tab[i+1][1] then
begin
tempelement := tab[i];
tab[i] := tab[i+1];
tab[i+1] :=tempelement;
end
end
end
for i := 0 to ilosc-1 do
begin
write(i+1);
write(": r=");
write(tab[i][0]);
write(" i=");
writeln(tab[i][1]);
end
repeat until keypressed;
end.
Revise this Paste
Parent: 35121