Uploading my cpp and r file for the final project.