1. b)2.9 ==> 0
11 ==> 1
14 ==> 2
17 ==> 3
22 ==> 4
3.type array200 = array [1 .. 200] of integer;
function f (n : byte; a : array200) : shortint;
var p, n, i : byte;
begin
p := 0;
n := 0;
for i := 1 to n do
if a[i] > 0 then inc(p)
else
if a[i] < 0 then inc(n);
p := p - n;
if p <> 0
then p := p div (abs(p));
f := p;
end;
4. a)var S, a, b, c : word;
begin
write('Dati S:');
readln(S);
if (S mod 3 < 2)
then a := S div 3
else a := S div 3 + 1;
b := a;
c := S - (a+b);
assign(f, 'rez.dat');
rewrite(f);
Write(f, a, b, c);
close(f);
end;
4. b)Well, produsul a trei numere este cu atat mai mare cu cat factorii sunt mai mari. Cam asta as avea de explicat ... in rest va las sa va mai ganditi si voi