Program bt;
Var i,n :integer;
a,b:array[1..100]of integer;
Begin
Write ('Nhap n:');
Readln(n);
Write (n,'=');
Repeat
i:=2;
while n mod i <> 0 do
i:=i+1;
Write(i);
n:=n div i;
if n > 1 then
write ('*');
Until n = 1; { <----- n = 1 thì thoát là v?a! }
readln;
end.
Copyright © 2024 VQUIX.COM - All rights reserved.
Answers & Comments
Verified answer
Program bt;
Var i,n :integer;
a,b:array[1..100]of integer;
Begin
Write ('Nhap n:');
Readln(n);
Write (n,'=');
Repeat
i:=2;
while n mod i <> 0 do
i:=i+1;
Write(i);
n:=n div i;
if n > 1 then
write ('*');
Until n = 1; { <----- n = 1 thì thoát là v?a! }
readln;
end.