added simple fortran to c++ code