From b4204dcca966b3d14a4033008acc977aa038a4e6 Mon Sep 17 00:00:00 2001 From: mohit0003 <31645375+mohit0003@users.noreply.github.com> Date: Sat, 23 Oct 2021 10:48:56 +0530 Subject: [PATCH] Update infix_to_postfix.cpp --- infix_to_postfix.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/infix_to_postfix.cpp b/infix_to_postfix.cpp index 5ffa1d3..ca49041 100644 --- a/infix_to_postfix.cpp +++ b/infix_to_postfix.cpp @@ -82,7 +82,7 @@ char stack::pop() */ if(top==-1) { - cout<<"UNDERFLOW!!"; + cout<<"UNDERFLOW!!!"; return -1; } else @@ -110,7 +110,7 @@ char stack::peek() */ if(top!=-1) - return arr[top]; + return arr[top]; else { cout<<"\nUNDERFLOW!"; @@ -131,7 +131,7 @@ bool stack::isEmpty() if(top==-1) return 1; else - return 0; + return 0; } bool stack::isFull() @@ -199,12 +199,13 @@ int main() /* objective:to implement stack operations */ + int ch,n,ele,x; string str; bool ans; char c; stack s; - cout<<"\nENTER INFIX EXPRESSION"; + cout<<"\nENTER INFIX EXPRESSION:"; cin>>str; conversion(str,str.length()); getch();