1) (1 => 0) => 1 = 1
2) 1 => (0 => 1) = 1
Удачи)
// PascalABC.NET 3.3.1611
begin
var sum := 0;
var n := 0;
ReadSeqIntegerWhile(x -> x <> 0).ForEach(x -> begin
n += 1;
if (0 < x) and (x <= 256) and (x mod 2 = 0) then
sum += x;
end);
println('Количество:', n);
println('Сумма:', sum);
end.
Uses Crt;
const
n=10;
var
a,b:array[1..n] of integer;
i,k,t:integer;
begin
ClrScr;
Randomize;
for i:=1 to n do begin
a[i]:=Random(50);
Write(a[i],' ')
end;
Writeln;
for i:=1 to n do begin
b[i]:=Random(50);
Write(b[i],' ')
end;
Writeln;
Write('k t='); Read(k,t);
for i:=1 to n do begin
if a[i]>t then a[i]:=a[i]+4;
Write(a[i],' ')
end;
Writeln;
for i:=1 to n do begin
if b[i]>10*k then b[i]:=b[i]+k;
Write(b[i],' ')
end;
Readkey
end.
<u><em>Тестовое решение:</em></u>
1 6 23 12 47 1 44 24 6 18
31 30 30 29 0 3 43 32 46 21
k t=2 20
1 6 27 12 51 1 48 28 6 18
33 32 32 31 0 3 45 34 48 23
#include <iostream.h>
#include <math.h>
using namespace std;
int main()
{
int x,y,z;
cout << "Vvedite X: " << endl;
cin >> x;
cout << "Vvedite Y: " << endl;
cin >> y;
z:=x*4-(x*3+y*2);
cout << "Otvet: " << z << endl;
return 0;
}<span>
</span>