source:
src/Clight/test/factorial.c
@
1545
Last change on this file since 1545 was 415, checked in by , 10 years ago | |
---|---|
File size: 140 bytes |
Line | |
---|---|
1 | int get_input(void); |
2 | |
3 | int main(void) { |
4 | int i = get_input(); |
5 | int r = 1; |
6 | int j; |
7 | |
8 | for (j = 2; j<=i; j++) |
9 | r = r * j; |
10 | |
11 | return r; |
12 | } |
Note: See TracBrowser
for help on using the repository browser.