Складіть у зошиті блок схему алгоритму для наведеного фрагмента проєкту і запишіть хід його виконання. s=0 a=0for i in range (4): a += 2 s = s + aprint (s)
var a,b,c, max, min:real; begin Readln(a,b,c); if (a > b) and (a > c) then Max:= a; if (c > b) and (c > a) then Max:= c; if (b > a) and (b > c) then Max:= b;
if (a < b) and (a < c) then Min:= a; if (c < b) and (c < a) then Min:= c; if (b < a) and (b < c) then Min:= b;
if (a <> min) and (a <> max) then writeln(a); if (b <> min) and (b <> max) then writeln(b); if (c <> min) and (c <> max) then writeln(c); end.
Пример: -9 3 6 3
Ответить на вопрос
Поделитесь своими знаниями, ответьте на вопрос:
Складіть у зошиті блок схему алгоритму для наведеного фрагмента проєкту і запишіть хід його виконання. s=0 a=0for i in range (4): a += 2 s = s + aprint (s)
var
a,b,c, max, min:real;
begin
Readln(a,b,c);
if (a > b) and (a > c) then Max:= a;
if (c > b) and (c > a) then Max:= c;
if (b > a) and (b > c) then Max:= b;
if (a < b) and (a < c) then Min:= a;
if (c < b) and (c < a) then Min:= c;
if (b < a) and (b < c) then Min:= b;
if (a <> min) and (a <> max) then writeln(a);
if (b <> min) and (b <> max) then writeln(b);
if (c <> min) and (c <> max) then writeln(c);
end.
Пример:
-9 3 6
3