C語言 計算機

用C實作簡易計算機:


要求使用者輸入一infix運算式,例如1+2*3。

印出此運算式的postfix結果,例如123*+。

再印出由postfix運算式的運算結果,例如7。
題目範圍

 運算子:+,-,*,/

 數字皆為正整數(大於0)
Update: to:wu
我用c++執行了你的程式 出現以下的錯誤
D:\Documents and Settings\Administrator\桌面\Untitled1.cpp In function `void ErrorExit(char*)':
Update 2: 14 D:\Documents and Settings\Administrator\桌面\Untitled1.cpp `system' undeclared (first use this function)
(Each undeclared identifier is reported only once for each function it appears in.)
Update 3: 15 D:\Documents and Settings\Administrator\桌面\Untitled1.cpp `exit' undeclared (first use this function)
D:\Documents and Settings\Administrator\桌面\Untitled1.cpp In function `int GetNextNum(char**)':
Update 4: 36 D:\Documents and Settings\Administrator\桌面\Untitled1.cpp `atoi' undeclared (first use this function)
D:\Documents and Settings\Administrator\桌面\Untitled1.cpp In function `int main()':
Update 5: 94 D:\Documents and Settings\Administrator\桌面\Untitled1.cpp `abs' undeclared (first use this function)
114 D:\Documents and Settings\Administrator\桌面\Untitled1.cpp `atoi' undeclared (first use this function)
Update 6: 122 D:\Documents and Settings\Administrator\桌面\Untitled1.cpp `system' undeclared (first use this function)

~.~ 也幫我解錯嗎?
Update 7: 不懂 大大意思

要怎麼修改? 可以更清楚一點嗎~

謝謝唷!
1 answer 1