c-first-steps

a C playground
Index Commits Files Refs README
commit 51d6dc5d68afec55afa31ba9e4e1fb6bc158b384
parent 1e56969c3804f7f5a02691b3a80dee2bc5e9af82
Author: Martin J. Klöckner <64109770+klewer-martin@users.noreply.github.com>
Date:   Thu, 29 Oct 2020 19:31:31 -0300

Update factorial.c

replaced res = res * i; with res =* i;
Diffstat:
Msrc/factorial.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/factorial.c b/src/factorial.c
@@ -16,7 +16,7 @@ int main(void) {
 
     res = 1;
     for(i = 1; 1 <= fact; i++) {
-        res = res * i;
+        res =* i;
     }
 
     printf("%d! = %d\n", fact, res);