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
Jitendra Kumar
NA
189
22.9k
Write an algorithm using any c#??
Aug 22 2018 7:45 AM
Write an algorithm using any computer language you are most comfortable with to process or evaluate a string that represents a postfix mathematical expression to the correct answer
.The
postfix expression must support the following Format.
expr:--?[0-9]+
expr : expr expr (+|-|*|/)
Some of the examples of the postfix expression and their respective results are represented below
Postfix Expression
Result
11+
2.0
2-3*
-6.0
11+23*-
-4.0
10 12+2+5++
20.0
The input to the algorithm is represented in a text file with each line in the file representing a postfix expression. write a console application that
Reads the file line by line
process each of the line with your algorithm
prints is an evaluation of each line to the console
typing "q" or reading letter q from input should terminate your console applications.
eG EXAMPLE OF INPUT IS BELOW
11+
22*
q
THE CONSOLE APPLICATION PRINTS THE VALUE
2
4
FOR RESULTSthat represent a floting-point number. please use the maximum
precision available to the platform
Reply
Answers (
1
)
how to show data saved sucessfully in asp dotnet after inser
how can validate In mvc Linq TO sql