Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program ZADACHA1;
- var
- a : array [1..20] of integer;
- j,i,t,n: integer;
- BEGIN
- randomize;
- for i:=1 to 20 do
- begin
- a[i]:=random(20);
- end;
- writeln(a);
- for j:=1 to 19 do
- for i:=j+1 to 20 do
- if (a[j] mod 2=0) and (a[i] mod 2=0) and (a[j] > a[i]) then
- begin
- t:=a[j];
- a[j]:=a[i];
- a[i]:=t;
- end;
- writeln(a);
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement