
#include "com_lan_factorial_FacLib.h"
#include "fac.h"

//extern long fac(long n);

JNIEXPORT jlong JNICALL Java_com_lan_factorial_FacLib_fac(JNIEnv *env, jclass clazz, jlong n)
{

	fac *f = new fac();
	jlong result = (jlong) (f->factorial(n));
	delete(f);
	return result ;
}
