Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

¥i¥HÀ°§Ú¼g³o­Óµ{¦¡¶Ü¡S

0 views
Skip to first unread message

可怕的佐籐藍子

unread,
May 13, 1999, 3:00:00 AM5/13/99
to

Write a C program to perform the on-line computation for an arithmetic expressio
n.

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

笨鳥

unread,
May 18, 1999, 3:00:00 AM5/18/99
to
==> 在 wildwi...@bbs.cs.nthu.edu.tw (可怕的佐籐藍子) 的文章中提到:
: Write a C program to perform the on-line computation for an arithmetic expre
: n.

: Program Requirements:
: Input: an arithmetic expression composed of integer operands (between 0 and
: 7) and operators (+, -, * and / ).

: Output: the on-line evaluation result of the expression
: (The program should include the error control for the input data.)

「可以幫我寫這個程式嗎?」可以! 我可以加入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]

0 new messages