//з № 1var s,d,f,max:integer;beginRead(s,d,f);if (s > d)and (s > f) thenmax:= selse if (d > s) and (d > f) thenmax:= delse if (f > d) and(f > s) then max:=f;write('max ',max);end.
//з № 2 var x:real; r:integer;beginwrite('Введите число x =');Read(x);if Frac(x)=0 then beginwriteln('x - целое число!');r:=round(x);if ((r mod 2)=0) then writeln('Число четное')else writeln('Число нечетное');endelse writeln('x - дробное число!')end.
//з № 3var a:integer;beginwrite('Введите число а =');Read(a);if (a > 0)and (a <= 5) thena:= a *a*aelse if (a > 5) thena:= a*aelsea:=a;write('a = ',a);end.
var arr : arr2; n : integer; i, sot, spl, snu : byte; ch : char;
begin write('Хотите использовать заданный по умолчанию массив? (y/n): '); ch := readkey; writeln(ch); sot := 0; spl := 0; snu := 0; if ((ch='y') or (ch='Y')) then begin { Используем заданный по умолчанию } for i:=1 to 12 do begin if arr1[i] > 0 then inc(spl); if arr1[i] < 0 then inc(sot); if arr1[i] = 0 then inc(snu); write(arr1[i], ' '); end; writeln; end else begin { Создаём и заполняем новый массив } write('Введите желаемый размер массива: '); readln(n); setLength(arr, n); writeln('Введите элементы массива:'); for i:=0 to high(arr) do readln(arr[i]); for i:=0 to high(arr) do begin if arr[i]>0 then inc(spl); if arr[i]<0 then inc(sot); if arr[i]=0 then inc(snu); write(arr[i], ' '); end; writeln; end;
//з № 1var s,d,f,max:integer;beginRead(s,d,f);if (s > d)and (s > f) thenmax:= selse if (d > s) and (d > f) thenmax:= delse if (f > d) and(f > s) then max:=f;write('max ',max);end.
//з № 2 var x:real; r:integer;beginwrite('Введите число x =');Read(x);if Frac(x)=0 then beginwriteln('x - целое число!');r:=round(x);if ((r mod 2)=0) then writeln('Число четное')else writeln('Число нечетное');endelse writeln('x - дробное число!')end.
//з № 3var a:integer;beginwrite('Введите число а =');Read(a);if (a > 0)and (a <= 5) thena:= a *a*aelse if (a > 5) thena:= a*aelsea:=a;write('a = ',a);end.
Объяснение: