source: Deliverables/D3.1/C-semantics/test/factorial.c @ 415

Last change on this file since 415 was 415, checked in by campbell, 9 years ago

A couple of amusing examples.

File size: 140 bytes
Line 
1int get_input(void);
2
3int 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.