for i: =1 to z-1 do for j: =i+1 to z do if st[i]> st[j] then
begin
t: =st[i];
st[i]: =st[j];
st[j]: =t;
end;
st[z+1]: ='-';
for i: =1 to z do i st[i]< > st[i+1] then write(st[i],' ');
end.
Ответ дал: Гость
uses crt; var n,i: integer; a: array[1..1000] of integer; beginread(n); for i: =1 to n do read(a[i]); for i: =1 to n do beginif a[i]< 0 then a[i]: =abs(a[i]); for i: =1 to n do write(a[i],' '); end.
Ответ дал: Гость
1)
var a,b,c,d: real;
begin
read(a,b);
c: =(a+b)/2;
d: =2*a*b;
if a> b then begin
a: =d;
b: =c;
end;
if a< b then begin
a: =c;
b: =d;
end;
writeln(a,' ',b);
end.
2)
var a,b: integer;
begin
read(a,b);
if (a< 1) or (a> 31) then writeln(' день введен неправильно');
if (b< 1) or (b> 12) then writeln(' месяц введен неправильно');
Популярные вопросы