TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Anil Vuyyuru
NA
3
0
Validating Math Expressions
May 29 2010 12:06 AM
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
Reply
Answers (
1
)
Dynamic generic cast at runtime
Printing in c#