diff options
| author | Carson Fleming <cflems@cflems.net> | 2026-07-21 14:36:02 -0700 |
|---|---|---|
| committer | Carson Fleming <cflems@cflems.net> | 2026-07-21 14:36:02 -0700 |
| commit | 0cabbd2a0853c332c82af621b8716643741d758a (patch) | |
| tree | 4d1772e07ff1b81e00b563f877c6f1ead3305a8d /test/factorial.c | |
| parent | f87e953223b7d498fc5401247952c08ab1e08f93 (diff) | |
| download | ccc-0cabbd2a0853c332c82af621b8716643741d758a.tar.gz | |
more faithful grammar
Diffstat (limited to 'test/factorial.c')
| -rw-r--r-- | test/factorial.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/factorial.c b/test/factorial.c new file mode 100644 index 0000000..0525b8f --- /dev/null +++ b/test/factorial.c @@ -0,0 +1,8 @@ +int fact (int n) { + if (n) return n * fact(n-1); + else return 1; +} + +int main (int argc, char** argv) { + return fact(argc); +} |
