Skip to content

Instantly share code, notes, and snippets.

@kdkanishka
Created January 24, 2020 09:32
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Simple C program that can be compiled into WebAssembly
#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