1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
var current, past, sum: real;
i, n: integer;
begin
current : = 10;
for i : = 1 to 10 do begin
writeln(i, ' ', current);
past : = current;
current : = current * 1.1;
end;
current : = 10; sum : = 0;
write('n = ');
read(n);
for i : = 1 to n do begin
sum : = sum + current;
writeln('за ', n, ' дней: ', sum);
end.
Для решения задачи используется метод кругов Эйлера, только здесь круги не круглые, а прямоугольные.)
S = 24
S1+S2+S3+S4 = 10
S3+S4+S5+S7 = 8
S2+S3+S6+S7 = 6
S2+S3 = 3
S3+S4 = 3
S3+S7 = 3
S3 = 1
S1+S4+S5 - ?
S1 - ?
S-(S1+S2+S3+S4+S5+S6+S7) - ?
S2 = (S2+S3)-S3 = 3-1 = 2
S4 = (S3+S4)-S3 = 3-1 = 2
S7 = (S3+S7)-S3 = 3-1 = 2
S1 = (S1+S2+S3+S4)-(S2+S3+S4) = 10-(2+1+2) = 5
S5 = (S3+S4+S5+S7)-(S3+S4+S7) = 8-(1+2+2) = 3
S1+S4+S5 = 5+2+3 = 10
S-(S1+S2+S3+S4+S5+S6+S7) = 24-(S2+S3+S6+S7)-(S1+S4+S5) =24-6-10 = 8
ответ: а)10; б)5; в)8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
var current, past, sum: real;
i, n: integer;
begin
current : = 10;
for i : = 1 to 10 do begin
writeln(i, ' ', current);
past : = current;
current : = current * 1.1;
end;
current : = 10; sum : = 0;
write('n = ');
read(n);
for i : = 1 to n do begin
sum : = sum + current;
past : = current;
current : = current * 1.1;
end;
writeln('за ', n, ' дней: ', sum);
end.