⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 usingmath.jsp

📁 jsp动态网站开发与实例(第3版) 源码
💻 JSP
字号:
	<%@page contentType="text/html"%>
	<%@page pageEncoding="ms950"%>
	<html>
	    <head><title>Math 类</title></head>
	    <body>
	    您输入的数字为
	    <%
	    String input = request.getParameter("value");
	    double value = Double.parseDouble(input);
	    %>
	    <font color = "red" size = "5"><%=value%></font>
	    <hr>
	    四舍五入后的整数值:<%=Math.round(value)%><br>
	    无条件进位的整数值:<%=Math.ceil(value)%><br>
	    无条件舍去的整数值:<%=Math.floor(value)%><br>
	    最接近的整数值  :<%=Math.rint(value)%><br>
	    绝对值      :<%=Math.abs(value)%><br>
	    平方根      :<%=Math.sqrt(value)%><br>
	
	    </body>
	</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -