Uses Crt;
const n=11;
type Vec=array [1..n] of integer;
var F: Vec;
i, Col, el,Rez: integer;
flag: boolean;
begin
for i:=1 to n do
begin
F[i]:=10+random(90);
if (F[i] mod 2 <>0) then Col:=Col+1;
end;
flag:=false;
for i:=1 to n do
if (F[i] mod 2 = 0) then
begin
flag:=true;
el:=F[i];
exit;
end;
Rez:=Col*el;
Writeln(' Rez = ', Rez);
ReadLn;
end.
<h2>№1</h2><h3>А) 11012₃ ? D16₁₆</h3>
<em>11012₃ = 2 + 3 +27 + 81 = </em><u><em>113₁₀</em></u>
<em>D16₁₆ = 6 + 16 + 3328 = </em><u><em>3350₁₀</em></u>
<u>D16₁₆ > 11012₃</u>
<h3>Б) 1F₁₆ ? 1101₃</h3>
<em>1F₁₆ = 15 + 16 = </em><u><em>31₁₀</em></u>
<em>1101₃= 1 + 9 + 27 = </em><u><em>37₁₀</em></u>
<u>1101₃ > 1F₁₆</u>
<h2>№2</h2><h3>А) 4278 =<em> ?₂</em></h3>
4278 = <em>8 + 7 * 9 + 2 * 81 + 4 * 729</em> = <u>3149</u>
<u>3149</u> = <em>2048 + 1024 + 64 + 8 + 4 + 1</em> = <u>110001001101₂</u>
<h3>Б) EF = <em>?₂</em></h3>
EF = <em>15 + 16 * 14</em> = <u>239</u>
<u>239</u> = <em>128 + 64 + 32 + 8 + 4 + 2 + 1</em> = <u>11101111₂</u>
<h2>№3</h2><h3>А) 11010112₃ + 110111012₃ = ?₁₀</h3>
011010112₃
+110111012₃
<u>121121201₃</u>
<u>121121201₃</u> = <em>1∙3⁸+2∙3⁷+1∙3⁶+1∙3⁵+2∙3⁴+1∙3³+2∙3²+0∙3¹+1∙3⁰ = 6561 + 4374 + 729 + 243 + 162 + 27 + 18 + 0 + 1</em> = <u>12115₁₀</u>
<h3><u>Б)</u> 10011102₃ - 01101112₃ = ?₁₀</h3>
10011102₃
-01101112₃
<u>1202220₃</u>
1202220₃ = 1202220₃ = 1∙3⁶+2∙3⁵+0∙3⁴+2∙3³+2∙3²+2∙3¹+0∙3⁰ = 729 + 486 + 0 + 54 + 18 + 6 + 0 = <u>1293₁₀</u>
Var s,t: string;
i: integer;
begin
writeln ('Введите строку: ');
readln (s);
t:='';
for i:=1 to length(s) do
if s[i]='а' then t:=t+s[i]+s[i] else t:=t+s[i];
writeln (t);
<span>end.</span>
procedure trapezoid(a, sl, c: real; var b, S, h, d: real);
begin
b := 2 * sl - a;
h := Sqrt(c * c - Sqr((a - b) / 2));
S := h * (a + b) / 2;
d := Sqrt(sl * sl + h * h);
end;
begin
var a := 10;
var sl := 7;
var c := 5;
var b, S, h, d: real;
trapezoid(a, sl, c, b, S, h, d);
Print(b, S, h, d)
end.