主题:[讨论]easy的题目
komer
[专家分:20] 发布于 2010-11-17 12:17:00
用文件输入输出格式编程:
a+b
a-b
a*b
a/b
来者有分
回复列表 (共4个回复)
沙发
qb12345 [专家分:620] 发布于 2010-11-17 12:22:00
1
open "a+b.in" for input as #1
open "a+b.out" for output as #2
input #1,a,b
print a+b
close
end
板凳
qb12345 [专家分:620] 发布于 2010-11-17 12:23:00
2
open "a-b.in" for input as #1
open "a-b.out" for input as #2
input #1,a,b
print #2,a-b
close
end
3 楼
qb12345 [专家分:620] 发布于 2010-11-17 12:24:00
3
open "a*b.in" for input as #1
open "a*b.out" for output as #2
input #1,a,b
print #2,a*b
close
end
4 楼
qb12345 [专家分:620] 发布于 2010-11-17 12:25:00
4
open "a/b.in" for input as #1
open "a/b.out" for output as #2
input #1,a,b
print #2,a/b
close
end
我来回复