?? 17-3.txt
字號:
const a=\a\, z='z', A=65,Z=91;
var c1,c2:char;
i1,i2:integer;
ordc1:integer;
begin
write("Please input two letters: ");
read(c1,c2);
write("Please input two integers: ");
read(i1,i2);
if c1>=a then
if c1<=z then
begin
ordc1 := c1-a+97;
write("The ASCII of c1 is: ",ordc1)
end
else
write("The letter you input is out of lowercase's range! ")
else
if c1<=Z then
if c1>=A then
begin
ordc1 := c1-A+65;
write("The ASCII of c1 is: ",ordc1)
end
else
write("The letter you input is out of uppercase's range! ")
else
write("The letter you input is invalid! ");
if c1<=c2 then
r3:=(r1*i1+r2*i2-r1*i2-r2*i1)/(r1+r2)
else
r3:=(r1*i2+r2*i1-r1*i1-r2*i2)/(r1+r2);
write("The result of arithmetic is: ",r3)
end.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -