Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var
- a, b, c, d, j, i, t:Integer;
- count:Real;
- label 1, 2, 3, 4, 5, 6;
- Begin
- readln (t);
- a:=2;
- 6:a:=a+2;
- count:=0;
- b:=0;
- 4:1:b:=b+1;
- if (b=a) then begin
- count:=(count / 2) ;
- writeln(a,'=' ,round(count));
- if (a=t) then goto 5;
- goto 6;
- end;
- c:=1;
- 2:c:=c+1;
- if (b mod c =0) then goto 1 else
- if (c>sqrt(b)) then begin
- d:= a-b;
- j:=round(sqrt(d));
- if (d=2) or (d=3) then goto 3;
- for i:=2 to j do
- begin
- if (d mod i=0) then begin
- goto 4;
- end;
- end;
- 3:count:=count+1;
- goto 4;
- end
- else
- goto 2;
- 5:end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement