From 979cd03518fe297d6046c0a8acacf43b78386861 Mon Sep 17 00:00:00 2001 From: Tanya Singh Date: Sun, 17 Oct 2021 14:31:02 +0530 Subject: [PATCH] Updated postfix_eval.cpp --- postfix_eval.cpp | 79 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) diff --git a/postfix_eval.cpp b/postfix_eval.cpp index 0aef7a2..e6be3a2 100644 --- a/postfix_eval.cpp +++ b/postfix_eval.cpp @@ -170,3 +170,82 @@ int main() postfixeval(a); } +//Using stack.h +#include +using namespace std; +#include "stack.h" + +void postfix_evaluation(string exp) +{ + Stack s; + int l = exp.length(); + for(int i=0; i>exp; + + cout<<"Result: "; + postfix_evaluation(exp); + + return 0; +}