• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help: convert from polish to infix notation

 
christian elvsaas
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all!
I'm trying to write a program to convert an expression from direct polish notation to infix notation. I have got a good start, but there are some problems when i enter a bit longer expressions, eg.
/*+ab-cd+c2
is displayed:
( ( ( a + b ) * ( c - d ) ) ( c + 2 ) / )
instead of:
( ( ( a + b ) * ( c - d ) ) / ( c + 2 ) )
as it should...so now I was hoping for some assistance on this problem, as I am stuck and don't know what to do.
My program is currently like this:

Cheers,
Christian
Edit:
I fixed it!! Yohooo!
[ September 30, 2003: Message edited by: christian elvsaas ]
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Congrats!!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic