Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (khai báo)
- BEGIN
- write('Nhập số phần tử của mảng: '); read(n);
- for i:=1 to n do read(a[i]);
- write('Các số nguyên tố là: ');
- for i:=1 to n do
- if a[i]<2 then logic:=False else
- begin
- logic:=True;
- for uoc:=2 to a[i]-1 do
- if a[i] mod uoc = 0 then logic:=False;
- if logic = True then write(a[i],' ');
- end;
- END.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement