1. uses crt; var n:string; begin read(n); writeln(strtoint(n[1])*strtoint(n[2])*strtoint(n[3])); end. 2. uses crt; var n,i:integer; res:double; begin read(n); for i:=1 to n do res:=res+cos(1/i); writeln(res:5:3); end. 3. uses crt; var n,i:integer; mult:real; a:array[1..100] of real; begin mult:=1; writeln('Input N and elements of array.'); read(n); for i:=1 to n do begin read(a[i]); if i mod 2=0 then mult:=mult*a[i]; end; writeln(mult); end. 4. uses crt; var n,i,sum:integer; a:array[1..100] of integer; begin writeln('Input N and elements of array.'); read(n); for i:=1 to n do read(a[i]); i:=1; while (a[i]<>0) and (i<=n) do begin if a[i] mod 2=0 then sum:=sum+a[i]; i:=i+1; end; writeln(sum); end.
x1 x2 x3 x4 x2∧x4 ¬x1 ¬x1∨x3 x2∧x4∧(¬x1∨x3) ¬x2∧x4∧(¬x1∨x3) ¬x1∧x2 ¬x3 ¬x1∧x2∧¬x3 x4∨¬x1∧x2∧¬x3 ¬x2∧x4∧(¬x1∨x3)∧(x4∨¬x1∧x2∧¬x3) x1∧x2 ¬x1∧x2 ¬x2∧x4∧(¬x1∨x3)∧(x4∨¬x1∧x2∧¬x3)∧¬x1∧x2 ¬x2∧x4∧(¬x1∨x3)∧(x4∨¬x1∧x2∧¬x3)∧¬x1∧x2≡1
0 0 0 0 0 1 1 0 1 0 1 0 0 0 0 1 0 0
0 0 0 1 0 1 1 0 1 0 1 0 1 1 0 1 1 1
0 0 1 0 0 1 1 0 1 0 0 0 0 0 0 1 0 0
0 0 1 1 0 1 1 0 1 0 0 0 1 1 0 1 1 1
0 1 0 0 0 1 1 0 1 1 1 1 1 1 0 1 1 1
0 1 0 1 1 1 1 1 0 1 1 1 1 0 0 1 0 0
0 1 1 0 0 1 1 0 1 1 0 0 0 0 0 1 0 0
0 1 1 1 1 1 1 1 0 1 0 0 1 0 0 1 0 0
1 0 0 0 0 0 0 0 1 0 1 0 0 0 0 1 0 0
1 0 0 1 0 0 0 0 1 0 1 0 1 1 0 1 1 1
1 0 1 0 0 0 1 0 1 0 0 0 0 0 0 1 0 0
1 0 1 1 0 0 1 0 1 0 0 0 1 1 0 1 1 1
1 1 0 0 0 0 0 0 1 0 1 0 0 0 1 0 0 0
1 1 0 1 1 0 0 0 1 0 1 0 1 1 1 0 0 0
1 1 1 0 0 0 1 0 1 0 0 0 0 0 1 0 0 0
1 1 1 1 1 0 1 1 0 0 0 0 1 0 1 0 0 0
Объяснение:
вроде так
uses crt;
var n:string;
begin
read(n);
writeln(strtoint(n[1])*strtoint(n[2])*strtoint(n[3]));
end.
2.
uses crt;
var n,i:integer;
res:double;
begin
read(n);
for i:=1 to n do
res:=res+cos(1/i);
writeln(res:5:3);
end.
3.
uses crt;
var n,i:integer;
mult:real;
a:array[1..100] of real;
begin
mult:=1;
writeln('Input N and elements of array.');
read(n);
for i:=1 to n do
begin
read(a[i]);
if i mod 2=0 then
mult:=mult*a[i];
end;
writeln(mult);
end.
4.
uses crt;
var n,i,sum:integer;
a:array[1..100] of integer;
begin
writeln('Input N and elements of array.');
read(n);
for i:=1 to n do
read(a[i]);
i:=1;
while (a[i]<>0) and (i<=n) do
begin
if a[i] mod 2=0 then
sum:=sum+a[i];
i:=i+1;
end;
writeln(sum);
end.