Pagini recente » Cod sursa (job #134862) | Cod sursa (job #2714034) | Cod sursa (job #1102240) | Cod sursa (job #1124397) | Cod sursa (job #78404)
Cod sursa(job #78404)
program factorial1;
var p:byte;
procedure citire;
var f:text;
begin
assign(f,'fact.in');
reset(f);
read(f,p);
close(f);
end;
function det(p:byte):integer;
var i,n,c:byte;
s:word;
begin
if p>1 then
begin
det:=p*5;
end;
if p=1 then
det:=5;
if p=0 then
det:=1;
end;
procedure afisare;
var f:text;
begin
assign(f,'fact.out');
rewrite(f);
write(f,det(p));
close(f);
end;
begin
citire;
afisare;
end.