博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
简单web四则运算出题
阅读量:6929 次
发布时间:2019-06-27

本文共 1511 字,大约阅读时间需要 5 分钟。

1 <%@ page language="java" contentType="text/html; charset=UTF-8" 2     pageEncoding="UTF-8"%> 3  4  5  6 
7 自动出题 8 9 10 11
12
13

自动出题

14

出题类型:整数15 真分数16 都有

17

出题数:

18
19
20 21 22 23 24
1 <%@ page language="java" contentType="text/html; charset=UTF-8" 2     pageEncoding="UTF-8"%> 3  4  5  6 
7 自动出题 8 9 <%!10 public String putong(){11 char [] a=new char[4];12 a[0]='+';a[1]='-';a[2]='*';a[3]='/';13 int num1=(int)(Math.random()*10+1);14 int num2=(int)(Math.random()*10+1);15 int num=(int)(Math.random()*4+0);16 String s=num1+" "+a[num]+" "+num2+" =?";17 return s;18 }19 %>20 <%!21 public String zhenfenshu(){22 char [] a=new char[4];String m,n="";23 a[0]='+';a[1]='-';a[2]='*';a[3]='/';24 int num1=(int)(Math.random()*10+1);25 int num2=(int)(Math.random()*10+1);26 for(;num1==num2;num1=(int)(Math.random()*10+1),num2=(int)(Math.random()*10+1)){}27 if(num1
46 47 48 <%49 String type = (String)request.getParameter("type");50 int chutishu=Integer.parseInt(request.getParameter("chutishu"));51 int j=0;52 String []a=new String [chutishu];53 54 for(j=0;j
77 <%=j+1+"、 "+a[j]%>
78 <%} %>79 80 81

 

转载于:https://www.cnblogs.com/ghs1065248758/p/6486673.html

你可能感兴趣的文章
R语言推特twitter转发可视化分析
查看>>
模仿也是提高,纯css小技巧实现头部进度条
查看>>
js 改变只读属性的值
查看>>
nodejs vue SyntaxError:Block-scoped declarations (let,const,function,class) not yet supported
查看>>
PHP JQUERY JSON 实现瀑布流
查看>>
英雄所见略同——每个人都有的一套价值体系观念
查看>>
oracle学习5
查看>>
Demo学习: Dialogs Anonymous Callback
查看>>
Android使用GestureDetector实现手势滑动效果
查看>>
Java设计原则之里氏替换原则
查看>>
智销功能_基本项目搭建
查看>>
并发编程之 Fork-Join 分而治之框架
查看>>
Spring @Import注解 —— 导入资源
查看>>
jquery 事件委托(利用冒泡)
查看>>
javascript数组去重算法-----4(另一种写法)
查看>>
mongodb启动关闭;
查看>>
MYSQL错误:You can't specify target table for update in FROM clause
查看>>
Java-输入输出流
查看>>
'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique
查看>>
Java知多少(87)选择框和单选按钮(转)
查看>>