个人作业1——四则运算题目生成程序
题目描述:
题目地址http://www.cnblogs.com/HQL0301/p/7502315.html,题目要求
-
![]()
- formula数组存放表达式,利用 int temp[i],temp[i+1] 分别表示分子和分母,组合生成 formula[i] = temp[i] + "/" + temp[i+1],formula[i+1] = "+-*/"......以此类推,将temp长度定为6,formula长度定为4,temp[0,1,2,3]为随机产生整数,formula[0] = temp[0] +"/" + temp[1], formula[2] = temp[2] + "/" +temp[3],
temp[4] temp[5] 分别保存计算的分子和分母,并将结果将其保存在formula[3]中
![]()
- 写入并保存文件PrintWriter,将formula写入TXT文件
![]()
-
在jsp页面应用java类
![]()
代码实现https://gitee.com/yancpp/codes/nm4pbefki2ugwqj80rc1z65





浙公网安备 33010602011771号