Skip to content

Latest commit

 

History

History
27 lines (22 loc) · 590 Bytes

README.md

File metadata and controls

27 lines (22 loc) · 590 Bytes

Problem 026

Write a parser which calculates the result of any arbitary mathematical expression.

Valid inputs may contain + / * - () and digits.

Persian Description

برنامه ای بنویسید که یک عبارت دلخواه ریاضی حاوی چهار عملگر اصلی به همراه پرانتز را دریافت کرده و نتیجه را محاسبه کند. اولویت عملگرها به ترتیب از بیشتر به کمتر * / +

Sample Input/Output

Input:

2 + 3 * 5
3 * 6 - 8 + 2
((2 + 3) * (4 + 6) / 2 ) - 5

Output:

17
12
20