1:
program prog;
var i,n,s,a:integer;
var chk:boolean;
begin
chk:=False;
s:=1;
write('Введите количество вводимых чисел: '); readln(n);
for i:=1 to n do
begin
write('Введите ', i, '-е число: '); readln(a);
if i mod 2 = 0 then
begin
s:=s*a;
chk:=True;
end;
end;
if chk = False then s:=0;
write('Произведение чётных членов введённой последовательности равно ', s);
end.
2:
program fib;
var
F1,F2,n,i :Integer;
begin
write('Введите количество чисел Фибоначчи: '); readln(n);
F1:=1;
F2:=1;
For i:=1 to n do
begin
if i>2 then
begin
F1:=F1+F2;
F2:=F1-F2;
end;
write(F1, ' ');
end;
end.
x
2
+
y
2
=
16
...
...
...
...
...
...
.
.
(
1
)
x + y = 4 (2)
rearrange (2) to y = 4 - x (could do x = 4 - y )
substitute y = 4 - x into (1)
hence:
x
2
+
(
4
−
x
)
2
=
16
⇒
x
2
+
16
−
8
x
+
x
2
=
16
and
2
x
2
−
8
x
+
16
−
16
=
0
⇒
2
x
2
−
8
x
=
0
factor and solve : 2x(x - 4 ) = 0
⇒
x
=
0
,
x
=
4
substitute these values into y = 4 - x , to find corresponding values of y.
x = 0 : y = 4 - 0 = 4 → (0 , 4)
x = 4 : y = 4 - 4 = 0 → (4 , 0 )
These are the points of intersection with the line x +y = 4 and the circle
x
2
+
y
2
=
16
Answer link
Объяснение:
BEGIN
x := 1; y := 0;
while x <= 7 do
begin
y := y+sqrt(x*x);
x := x+1;
end;
y := sqrt(y);
writeln (y);
END.
Но вообще-то по-нормальному
y = √(1 + 2 + ... + 6 + 7)
И решается намного проще.