这是原题:
Project 1: Desk Calculator
This project requires you to write a program that imitates a simple desk
calculator. Your calculator must be able to accept an infix expression which at least
includes (, ), +, -, *, /, %, and ^ (exponentiation operator, a^b = a ). If the expression is
legal, output its value, else output an error message.
Input Specification:
ourprogrammustreadtestcasesfromafile“input.txt”. In the file there are
several test cases, each occupies one line that contains an infix expression. Proceed until the end of the file.
Output Specification:
for each test case,output to a file “output.txt”in one line the value of that
expression(accurate up to two decimalplaces),or an error message“ERROR"
老师说这是浙大教科书上的一道题,看到这个我真的傻眼了,求大神
”.
关于 desk calculator 程序
- 写回答
- 好问题 0 提建议
- 追加酬金
- 关注问题
- 邀请回答
-
0条回答
悬赏问题
- ¥20 有人能用聚类分析帮我分析一下文本内容嘛
- ¥15 请问Lammps做复合材料拉伸模拟,应力应变曲线问题
- ¥30 python代码,帮调试
- ¥15 #MATLAB仿真#车辆换道路径规划
- ¥15 java 操作 elasticsearch 8.1 实现 索引的重建
- ¥15 数据可视化Python
- ¥15 要给毕业设计添加扫码登录的功能!!有偿
- ¥15 kafka 分区副本增加会导致消息丢失或者不可用吗?
- ¥15 微信公众号自制会员卡没有收款渠道啊
- ¥100 Jenkins自动化部署—悬赏100元