Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program CAU3;
- var i, j, n, a, b, c:integer;
- Begin
- readln(a, b);
- c:=0;
- for n:=a to b do
- begin
- j:=1;
- for i:=2 to n-1 do
- begin
- if n mod i = 0 then j:=0;
- end;
- if (j = 1) and (n > 1) then c:=c+1;
- end;
- writeln(c);
- readln;
- End.
Add Comment
Please, Sign In to add comment