Var a, b, c: real;
begin
Write(‘введите числа>>’);
readln(a,b,c);
If a<0 then
If b<0 then
If c<0 then
Write(‘0’)
else
Write(c)
Else
If c<0 then
Write (b)
Else
Write(c+b)
Else if b<0 then
If c<0 then
write (a)
Else
Write(a+c)
Else
If c<0 then
Write(a+b)
Else
write(a+b+c);
End.
var i,n,m,sum,pr,k,j:longint;
begin
sum:=0; pr:=1;
write('m: '); readln(m);
write('n: '); readln(n);
i:=2;
repeat
if m mod i = 0 then
begin
sum:=sum+i;
m:=m div i;
i:=2;
end
else inc(i);
until m=1;
writeln('Sum_M:', sum);
for i:=2 to n div 2 do
if n mod i = 0 then
begin
k:=2;
for j:=2 to i div 2 do
if i mod j = 0 then inc(k);
if (k>2)and(i mod 3 = 0 ) then
pr:=pr*i;
end;
writeln('Proizv_N:', pr);
if sum>pr then writeln('Da, sum prost del M > proizv sost del N')
else
writeln('Net, sum prost del M < proizv sost del N');
end.
150/160/170
Объяснение: