Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  yes
Language: PASCAL
Code:
program yyy; 
function prost(x:integer):boolean; 
var k,i:integer; 
begin 
k:=0; 
for i:=2 to trunc(sqrt(x)) do
  if x mod i = 0 then k:=k+1; 
prost:=k=0
end; 

var n,m,i:integer; 
begin 
write('n='); readln(n); 
write('m='); readln(m); 
for i:=n to m-2 do
 if prost(i) and prost(i+2)
  then writeln(i,'  ', (i+2)); 
end.

Подробнее - на Znanija.com - https://znanija.com/task/17551203#readmore
Comments: