PROGRAM SO-NGUYEN-TO;
USES CRT;
VAR N,I,S:INTEGER;
BEGIN
CLRSCR;
WRITE('NHAP N:');READLN(N);
FOR I:=2 TO N-1 THEN
IF N MOD I = 0 THEN S:=S+I;
IF S=0 THEN WRITE(N,':LA SO NGUYEN TO')
ELSE WRITE(N,':KO PHAI LA SO NGUYEN TO');
READLN;
END.
program songuyen;
uses crt;
var a:array[1..100] of byte;
i,j,n,d,si,snt: byte;
begin
clrscr;
write( N = ); readln(n);
For i:=1 to n do
begin
write( Phan tu thu ,i, : ); readln(a[i]);
end;
for i:=1 to n do
begin
d:=0;
si:= trunc(sqrt(a[i]));
For j:=2 to si do
if a[i] mod j <> 0 then d:=d+1;
if d=si-1 then inc(snt);
end;
write( So cac snt: ,snt);
readln
end.
uses crt;
var n,i,k,j:integer;
BEGIN
clrscr;
write('nhap n= ');readln(n);
for i:=1 to n do
begin
j:=0;
for k:=1 to i do j:=j+1;
if j=2 then
witeln('cac snt từ 1 den n la ',i);
end;
readln;
END.
chưa chắc đã đúng đâu
em mới hok lớp 6 thử = máy tính có j sai giúp em sửa nha