• Post Reply Bookmark Topic Watch Topic
  • New Topic

Expression evaluation  RSS feed

 
Laxmikant Kumbhare
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I need to evaluate the expression. Please help me!

Example:

equation is:
a = b + c * d + e / f
I need to print on console

x= c * d
y = e / f
z = b + x
w = z + y
a= w

I separated the expression by splitting string
but after i am confused what to do!

Please help me.
 
John Jai
Rancher
Posts: 1776
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please post the code you have tried for better understanding the issue you face.
 
Campbell Ritchie
Marshal
Posts: 56599
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you writing the expression as code, or are you parsing it?
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!