Напишите комментарии к программе.PASCAL!
Program granat;
Uses Crt;
Var A: array [1..10] of integer;
i,k,x,z,vsp:integer;
begin
write ('Исходный массив:');
for i := 1 to 10 do
A[i]:=random(10);  {Заполняем массив}
for i := 1 to 10 do
Write (A[i]:3);
writeln;
begin
for k:=1 to 9 do
begin
x:=A[k];
vsp:=k;
for i:=k+1 to 10 do
if a[i]<x then
begin
x:=A[i];
vsp:=i;
end;
if  vsp>k then
begin
z:=a[k];
a[k]:=a[vsp];
a[vsp]:=z;
end;
end;
end;
write ('Отсортированный массив:');
begin
for i:=1 to 10 do
begin
if A[i] mod 2 = 0 then
Write ('  ',A[i]) else;
end;
end;
end.
Please enter comments
Please enter your name.
Please enter the correct email address.
You must agree before submitting.

Answers & Comments


Copyright © 2024 SCHOLAR.TIPS - All rights reserved.