Program Requirements:
Input: an arithmetic expression composed of integer operands (between 0 and 6553
7) and operators (+, -, * and / ).
Output: the on-line evaluation result of the expression
(The program should include the error control for the input data.)
Example:
Input
Output
1+2+3/4
1.5
20*2-15/2
12.5
Bonus:
Evaluate the expression as fractions.
Example:
Input
Output
1+2+3/4
3/2
20*2-15/2
25/2
Due Date: May 19, 1999 (extended to May 26, 1999)
--
※ Origin: 楓橋驛站<bbs.cs.nthu.edu.tw> ◆ From: u860928.LI.ab.nthu.edu.tw
「可以幫我寫這個程式嗎?」可以! 我可以加入K人的行列! 自己根本沒想過,
還要人幫你寫...你是初學者嗎? Shxt. 初學者更應自己想想後, 再把關鍵的
瓶頸post出來。像這樣「完整」把題目post出來, 然後再請人「幫忙寫」,那
就不必在這個板post出來了...
(呵...我心軟...用prefix/infix/postfix其中一種, 再配合stack來做)
--
╒══════╒══── ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ Graduate
╒╧══════ │ ﹏﹏ ─── ̄ ̄ Institute
│★ │ ﹏﹏ ── ̄ ̄ of
╭╯ ╭----- │ M.I.S.
│ ||Falcon/笨鳥 ───┘ NYUst
◤ ∟═╩═══ E-mail: gmi...@mis.yuntech.edu.tw
--
[m● Origin : 雲林科技大學藍天使 <bbs.yuntech.edu.tw> [FROM: 140.125.81.83]