Program asd;
uses crt;
var a,b,c,max:integer; r:real;
begin
Write('Введите число A: ');
Readln(a);
Write('Введите число B: ');
Readln(b);
Write('Введите число C: ');
Readln(c);
If a>=b then max:=a
else
max:=b;
If c>max then
max:=c;
r:=a+b+c;
If (A>B) and (B>C) and (C>0) then
Writeln('A= ',a*2,' B= ',b*2,' C= ',c*2);
If (A<0) and (B<0) and (C<0) and (A<>B) and (B<>C) and (C<>A) then
begin
A:=max;
B:=max;
C:=max;
Writeln('A= ',a,' B= ',b,' C= ',c);
end
else
Writeln('Symma: ',r);
end
Объяснение:
Program asd;
uses crt;
var a,b,c,max:integer; r:real;
begin
Write('Введите число A: ');
Readln(a);
Write('Введите число B: ');
Readln(b);
Write('Введите число C: ');
Readln(c);
If a>=b then max:=a
else
max:=b;
If c>max then
max:=c;
r:=a+b+c;
If (A>B) and (B>C) and (C>0) then
Writeln('A= ',a*2,' B= ',b*2,' C= ',c*2);
If (A<0) and (B<0) and (C<0) and (A<>B) and (B<>C) and (C<>A) then
begin
A:=max;
B:=max;
C:=max;
Writeln('A= ',a,' B= ',b,' C= ',c);
end
else
Writeln('Symma: ',r);
end
i,min,max:integer;
begin
for i:=0 to 4 do
read(a[i]);
max:=a[0];
min:=a[0];
for i:=1 to 4 do begin
if max<a[i] then
max:=a[i];
if min>a[i] then
min:=a[i];
end;
writeln('Максимальное число:',max);
write('Минимальное число:',min);
end