Begin
write('Введите целое число n (n > 1): ');
var n := ReadInteger;
var a := 1;
var b := 1;
write(1, ' ', 1, ' ');
for var i := 3 to n do
begin
var c := a + b;
write(c, ' ');
a := b;
b := c;
end;
end.
Program n1;
var a: array[1..30] of integer;
i: integer;
begin
randomize;
for i:=1 to 30 do
begin
a[i]:=random(30)+1;
if a[i] mod 5=0 then write(a[i],' ');
end;
end.
#include <iostream>
int main (){ int n ; float res = 0, r; std::cin >> n; for (int i = 0; i < n; i++) { std::cin >> r; res += 1/r; } res = 1/res; std::cout << res;}
Буду писать 4 цифры, 1 - A 2 - B 3 - C 4 - Результат
1)
0 0 0 1
0 0 1 0
0 1 0 1
0 1 1 0
1 0 0 1
1 0 1 0
1 1 0 0
1 1 1 0
2)
0 0 0 1
0 0 1 1
0 1 0 1
0 1 1 1
1 0 0 1
1 0 1 0
1 1 0 1
1 1 1 1
3)
0 0 0 1
0 0 1 0
0 1 0 1
0 1 1 0
1 0 0 1
1 0 1 0
1 1 0 0
1 1 1 0
4)
0 0 0 0
0 0 1 1
0 1 0 0
0 1 1 1
1 0 0 0
1 0 1 1
1 1 0 0
1 1 1 0
5)
0 0 0 1
0 0 1 0
0 1 0 0
0 1 1 0
1 0 0 0
1 0 1 0
1 1 0 0
1 1 1 0