writting a easy program of Dev C++幫我寫個程式...( 20 point)

2008-05-30 7:54 pm
如題

program description

A.... Write a program to simulate an a@b operation machine.
B.... The program will accept two integers from the keyboard.
C.... The @ operation is one of the four arithmetic operation namely '+', '-' ,'*', '/'
D.... The users will input 1,2,3,4 though the keyboard to signify their intended @
operation. Input of 1 stand for the '+' operation, 2 stand for '-' operation, 3
stand for the '*' operation and 4 stand for '/' operation.
E.... The program will output result of the operation together with a proper
expression such as 1+2=3 , if the input are 2 and3, and the + operation is
chosen.

回答 (2)

2008-06-01 2:54 pm
✔ 最佳答案
Here is a program that you are looking for. Notice that integers are used in the four operations, so 4/8=0, as the result is truncated to an integer. Similarly, integers or the results that exceed the limit of about 231-1 (about 2 trillions) will not be valid.

You can find the coding at the following address under your own question id = 7008053000720.
http://mathmate.brinkster.net/programming.htm
Unfortunately, without HTML tools, yahoo edits the contents of programs that renders it incomprehensible.
2008-05-31 3:22 am
你好,我推薦你一個關于 Xanga 基本語法教學的網站,他包括許多 Xanga 的小技巧, Xanga Skin, Xanga Script.

http://www.xanga-help.com

希望這個網站對你有參考價值。

祝你好運!


收錄日期: 2021-04-13 15:38:14
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20080530000051KK00720

檢視 Wayback Machine 備份