program faktorial;
uses wincrt;
var i,n,f :integer;
begin
readln (n); f:=1; i:=0;
repeat
i:= i+1;
f:=f*i;
until i=n;
writeln (n, 'faktorial= ',f);
end.
program faktorial;
uses wincrt;
var i,n,f :integer;
begin
readln (n); f:=1; i:=0;
for i:=1 to n do
begin
f:=f*i;
writeln (n, 'faktorial= ',f);
end;
end.
program faktorial;
uses wincrt;
var i,n,f :integer;
begin
readln (n); f:=1;
while i<n do
begin
i:= i+1;
f:=f*i;
writeln (n, 'faktorial= ',f);
end;
end.
Tidak ada komentar:
Posting Komentar