1)
var
a, b, c, d, max: integer;
begin
readln(a, b, c, d);
if(a > b) and (a > c) and (a > d) then max := a
else if(b > a) and (b > c) and (b > d) then max := b
else if(c > a) and (c > b) and (c > d) then max := c
else max := d;
write(max);
end.
2)
var
a, b, c, max:
integer;
begin
readln(a, b, c);
if(a > b) and (a > c) then max := a
else if(b > a) and (b > c) then max := b
else max := c;
write(max);
end.
Abs(−26)=26
sqr(b)=676
sqr(b+b)=2704
Я делала такое на доп. курсах информатики, всё просто.
Правильный ответ 7. Алгоритм считает сколько исполнителей набрали меньше 25 голосов. Это 1-й,2-й,3-й,5-й,6-й,8-й,9-й всего таких - 7
Ну принцип какой... У тебя дан for от 1 до 9, т.е. 8 раз надо провести операцию s=s×x
1s=2, т.к. 2*1=2
2s=4
3s=8
4s=16
5s=32
6s=64
7s=128
8s=256
И ответом выйти должно 256
Var
s : Real;
i,n : Integer;
Begin
s:=0;
Readln(n);
For i:=1 to n do s:=s-n/(2*i);
end.