<u>// PascalABC.NET 3.3, сборка 1555 от 21.10.2017</u>
<u>// Внимание! Если программа не работает, обновите версию!</u>
begin
var (p,q):=(1,0);
for var i:=1 to 1000 do begin
var (flag,j,r):=(True,2,Round(Sqrt(i)));
while flag and (j<=r) do
if i mod j = 0 then flag:=false
else j+=1;
if flag then begin
(p,q):=(q,i);
if q-p=4 then Write('(',p,',',q,') ')
end
end
end.
<u>Результат</u>
(7,11) (13,17) (19,23) (37,41) (43,47) (67,71) (79,83) (97,101) (103,107) (109,113) (127,131) (163,167) (193,197) (223,227) (229,233) (277,281) (307,311) (313,317) (349,353) (379,383) (397,401) (439,443) (457,461) (463,467) (487,491) (499,503) (613,617) (643,647) (673,677) (739,743) (757,761) (769,773) (823,827) (853,857) (859,863) (877,881) (883,887) (907,911) (937,941) (967,971)
З1:
Program z;
var mas: array [1..10] of integer;
i, x: integer;
begin
for i:=1 to 10 do
readln(mas[i]);
for x:=1 to 10 do
if mas[x] mod 2 = 1 then writeln(mas[x]);
<span>end.
</span>З2:
Program z;
var mas: array [1..10] of integer;
i, x: integer;
begin
for i:=1 to 10 do
readln(mas[i]);
for x:=1 to 10 do
if (mas[x] mod 2 = 0) and (mas[x] > 0) then writeln(mas[x]);
end.
Всем нужна тишина это загадка такая