Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
1
Answer
Validating Math Expressions
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
Anil Vuyyuru
14y
4.7k
1
Reply
Hi all
I have an interesting scenario. But very confused on how to implement. Here is what it is:
I need to design an online system which evaluates the right answer for a mathematical question. For example I have a question for which the answer needs to be (X
2
+2XY+3)/ (XYZ+9). Now there might be other possible answers as well for each question , as for the above the other answer might be (X
2
+2
YX
+3)/ (XYZ+9) and the other might be (X
2
+2
YX
+3)/ (
ZXY
+9).
My case is I have to evaluate the user input which I need to compare with the right possible answers..In case any one of the possible answers matches with the user input then mark it as 'Right' answer. matches in the sense NOT THE VALUE OF THE EXPRESSION but the EXPRESSION BY ITSELF. How to compare these kind of Math algebraic expressions using C#.
Please help with your sample coding.
Your ideas and time will be much appreciated.
Thanks in advance
Anil
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
Dynamic generic cast at runtime
Printing in c#