0
0
Hãy luôn nhớ cảm ơn và vote 5*
nếu câu trả lời hữu ích nhé!
168
95
Uses crt;
Var n,i,k,code,kt,kq,j: longint; s: string;
A: Array[1..100000000] of longint;
Begin
clrscr;
Write('Nhap so n: '); Readln(n); A[1]:=n; str(n,s); k:=length(s);
i:=1;
If n>9 then
Repeat
delete(s,k-i+1,1);
i:=i+1;
val(s,A[i],code);
Until i=k;
For i:=1 to k do
begin
kt:=0;
For j:=1 to A[i] do If A[i] mod j=0 then kt:=kt+1;
If kt<>2 then kq:=kq+0 else kq:=kq+1;
end;
If kq=0 then write(A[1],' la so phan nguyen to!')
else write(A[1],' khong phai la so phan nguyen to!');
Readln;
End.
Chúc bạn học tốt!
Hãy giúp mọi người biết câu trả lời này thế nào?
Bảng tin