Calculator in Java and C using JNI