Created
January 24, 2020 09:32
-
-
Save kdkanishka/1b1cd8b05340e56b267c78e34fbc8bab to your computer and use it in GitHub Desktop.
Simple C program that can be compiled into WebAssembly
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <emscripten.h> | |
int EMSCRIPTEN_KEEPALIVE fib(int n){ | |
if(n == 0 || n == 1) | |
return 1; | |
else | |
return fib(n - 1) + fib(n - 2); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment