Free Pascal程式一問 (10分)

2007-03-22 6:20 am
點用Free Pascal寫計數機程式? (能用來計+, - *)(一次過)
ex.(這只可計+)
Program lesson1_program3;
var
Num1, Num2, Sum : Integer;

Begin
Write('Input number1 : ');
Readln(Num1);
Writeln('Input number 2 :');
Readln(Num2);
Sum:=Num1+Num2;
Writeln(Sum);
Readln;
end.

我要一次過計到+,-,*. pls help me!!!

回答 (1)

2007-03-23 12:03 am
✔ 最佳答案
ok, just give you an idea ...
Answer1:=Num1+Num2;
Answer2:=Num1-Num2;
Answer3:=Num1*Num2;
Writeln(Answer1);
Writeln(Answer2);
Writeln(Answer3);


收錄日期: 2021-04-22 00:29:02
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20070321000051KK04695

檢視 Wayback Machine 備份