repo.or.cz
/
sdcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Hackfix and re-enable strtoull and wcstoull, see bug #3798.
[sdcc.git]
/
sdcc
/
support
/
regression
/
tcc
/
15_recursion.c
blob
f79a00df5880c60a0bcdac48a1d1d2871f0c2894
1
#include <stdio.h>
2
3
int
factorial
(
int
i
)
4
{
5
if
(
i
<
2
)
6
return
i
;
7
else
8
return
i
*
factorial
(
i
-
1
);
9
}
10
11
int
main
()
12
{
13
int
Count
;
14
15
for
(
Count
=
1
;
Count
<=
10
;
Count
++)
16
printf
(
"%d
\n
"
,
factorial
(
Count
));
17
18
return
0
;
19
}
20
21
/* vim: set expandtab ts=4 sw=3 sts=3 tw=80 :*/