Add the algorithm to calculate reverse polish notation and test in main function