Fix 2022 misidentified day0
This commit is contained in:
@@ -0,0 +1 @@
|
||||
4
|
||||
@@ -0,0 +1 @@
|
||||
24
|
||||
@@ -0,0 +1,21 @@
|
||||
Program Factorial;
|
||||
var n, i : integer;
|
||||
F : longint;
|
||||
Intrare, Iesire : text;
|
||||
label 1;
|
||||
begin
|
||||
{ Citirea datelor de intrare }
|
||||
assign(Intrare, 'fact.in');
|
||||
reset(Intrare);
|
||||
readln(Intrare, n);
|
||||
close(Intrare);
|
||||
{ Calcularea factorialului }
|
||||
F:=1;
|
||||
if n=0 then goto 1;
|
||||
for i:=1 to n do F:=F*i;
|
||||
1: { Scrierea datelor de iesire }
|
||||
assign(Iesire, 'fact.out');
|
||||
rewrite(Iesire);
|
||||
writeln(Iesire, F);
|
||||
close(Iesire);
|
||||
end.
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,2 @@
|
||||
5
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
120
|
||||
@@ -0,0 +1,2 @@
|
||||
7
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
5040
|
||||
@@ -0,0 +1 @@
|
||||
8
|
||||
@@ -0,0 +1 @@
|
||||
40320
|
||||
@@ -0,0 +1 @@
|
||||
6
|
||||
@@ -0,0 +1 @@
|
||||
720
|
||||
@@ -0,0 +1,3 @@
|
||||
12
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
479001600
|
||||
Reference in New Issue
Block a user