Вариант 4 1. Запишите развернутую форму чисел 54,2014; 504,1245; 7401,28 2. Вычислите десятичный эквивалент следующих чисел 51246; 16427; 120124 3. Представьте десятичное число в указанной системе счисления 4210(10) →X4 715(10)→ Х(5) 1824(10) →X6
Var a1,a2,a3,a4,a5,a6,a7,a8,k:integer; begin k:=0; read (a1,a2,a3,a4,a5,a6,a7,a8); if (a1>0) and (a2>0) and (a3>0) and (a4>0) and (a5>0) and (a6>0) and (a7>0) and (a8>0) then begin if (a1 mod 3 = 0) and (a1 mod 10 = 4) then k:=k+1; if (a2 mod 3 = 0) and (a2 mod 10 = 4) then k:=k+1; if (a3 mod 3 = 0) and (a3 mod 10 = 4) then k:=k+1; if (a4 mod 3 = 0) and (a4 mod 10 = 4) then k:=k+1; if (a5 mod 3 = 0) and (a5 mod 10 = 4) then k:=k+1; if (a6 mod 3 = 0) and (a6 mod 10 = 4) then k:=k+1; if (a7 mod 3 = 0) and (a7 mod 10 = 4) then k:=k+1; if (a8 mod 3 = 0) and (a8 mod 10 = 4) then k:=k+1; writeln (k); end else writeln ('Неверный ввод'); end.
Program lol (input, output); var a, n, b, i, p,s,g m:integer; c:real; begin n:=Random(10000); writeln (n); a:=n; b:=0; c:=0; p:=1; g:=1; while a <> 0 do begin a:=a div 10; b:=b+1; end; while b <> 0 do begin p:=1; for m:=1 to b do p:=p*10; s:=(n mod p) div (p div 10); c:=c+s; g:=g*s; b:=b-1; end; writeln (c); writeln (g); end.
program lol (input, output); var a, b, i, z:integer; begin b:=0; a:=3; z:=0; while a > 2 do begin read (a); z:=0; for I:=2 to a do begin if a mod I = 0 then begin z:=z+1; if (a=I) and (z=1) then b:=b+1; end; end; end; writeln (b); end.
begin
k:=0;
read (a1,a2,a3,a4,a5,a6,a7,a8);
if (a1>0) and (a2>0) and (a3>0) and (a4>0) and (a5>0) and (a6>0) and (a7>0) and (a8>0) then
begin
if (a1 mod 3 = 0) and (a1 mod 10 = 4) then k:=k+1;
if (a2 mod 3 = 0) and (a2 mod 10 = 4) then k:=k+1;
if (a3 mod 3 = 0) and (a3 mod 10 = 4) then k:=k+1;
if (a4 mod 3 = 0) and (a4 mod 10 = 4) then k:=k+1;
if (a5 mod 3 = 0) and (a5 mod 10 = 4) then k:=k+1;
if (a6 mod 3 = 0) and (a6 mod 10 = 4) then k:=k+1;
if (a7 mod 3 = 0) and (a7 mod 10 = 4) then k:=k+1;
if (a8 mod 3 = 0) and (a8 mod 10 = 4) then k:=k+1;
writeln (k);
end else
writeln ('Неверный ввод');
end.
var a, n, b, i, p,s,g m:integer;
c:real;
begin
n:=Random(10000);
writeln (n);
a:=n;
b:=0;
c:=0;
p:=1;
g:=1;
while a <> 0 do
begin
a:=a div 10;
b:=b+1;
end;
while b <> 0 do
begin
p:=1;
for m:=1 to b do
p:=p*10;
s:=(n mod p) div (p div 10);
c:=c+s;
g:=g*s;
b:=b-1;
end;
writeln (c);
writeln (g);
end.
program lol (input, output);
var a, b, i, z:integer;
begin
b:=0;
a:=3;
z:=0;
while a > 2 do
begin
read (a);
z:=0;
for I:=2 to a do
begin
if a mod I = 0 then
begin
z:=z+1;
if (a=I) and (z=1) then
b:=b+1;
end;
end;
end;
writeln (b);
end.