1 вариант:
If (a>0) or (a=0) and (b>0) or (b=0) and (c>0) or (c=0) Then s:=a+b+c Else
If (a>0) or (a=0) and (b>0) or (b=0) and (c<0) Then s:=a+b Else
If (a>0) or (a=0) and (c>0) or (c=0) and (b<0) Then s:=a+c Else
If (b>0) or (b=0) and (c>0) or (c=0) and (a<0) Then s:=b+c Else
If (a<0) and (b<0) and (c>0) or (c=0) Then s:=c Else
If (a<0) and (c<0) and (b>0) or (b=0) Then s:=b Else s:=a;
2 вариант:
If (a>0) or (a=0) Then s:=s+a;
If (b>0) or (b=0) Then s:=s+b;<span>
If (c>0) or (c=0) Then s:=s+c;</span>
Ответ: 1. получение новой информации;
2. изменение формы представления
Var a,b,s: real;
begin
a:=5;
b:=-3.5;
s:=a+b;
s:=2*s-b;
writeln(s);
end.
ОТВЕТ
6,5
Var a:integer;
begin
write('введите число ');
read(a);
if ((a div 10 + a mod 10) mod 3=0) writeln('YES') else write ('NO');
end.
Var
n, i, c : integer;
a : array [1..1000] of integer;
begin
read (n);
for i := 1 to n do read (a[i]);
for i := 1 to n div 2 do
begin
c := a[i*2];
a[i*2] := a[i*2-1];
a[i*2-1] := c;
end;
for i := 1 to n do
write (a[i], ' ');
end.