L language algorithm implemented by c language