From 07766b1ebf6ee4c799a3fa5d8f553881a72829c6 Mon Sep 17 00:00:00 2001 From: Leo Tenenbaum Date: Mon, 21 Oct 2019 11:20:31 -0400 Subject: del slices --- out.c | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) (limited to 'out.c') diff --git a/out.c b/out.c index ba1a23a..c1c1926 100644 --- a/out.c +++ b/out.c @@ -36,19 +36,30 @@ void puti(i64 x) { i64 factorial(i64 x) { - i64 a0_; - if ((x==0)) { - a0_ = 1; - } else { - a0_ = (x*(factorial((x-1)))); - }return a0_; + slice_ numbers; { + slice_ expr__; slice_ a0_; a0_.data = calloc(x, sizeof(i64)); a0_.n = x;expr__ = a0_;numbers = expr__;} + i64 i; { + i64 expr__; expr__ = 0;i = expr__;} + while ((i