zoukankan      html  css  js  c++  java
  • jsp第三次作业

    <%@ page language="java" contentType="text/html; charset=UTF-8"
        pageEncoding="UTF-8"%>
    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="UTF-8">
    <title>Insert title here</title>
    </head>
    <body>
        <jsp:include page="circle.jsp">
            <jsp:param name="banJing" value="2" />
        </jsp:include>
        <br>
        <jsp:include page="ladder.jsp">
            <jsp:param value="4" name="shang" />
            <jsp:param value="7" name="xia" />
            <jsp:param value="3" name="gao" />
        </jsp:include>
    </body>
    </html>
    <%@ page language="java" contentType="text/html; charset=UTF-8"
        pageEncoding="UTF-8"%>
    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="UTF-8">
    <title>Insert title here</title>
    </head>
    <body>
        <%
    String banJing = request.getParameter("banJing");
    double r = Double.parseDouble(banJing);
    double pai = 3.14;
    out.print("圆的面积是"+pai*r*r);
    %>
    </body>
    </html>
    <%@ page language="java" contentType="text/html; charset=UTF-8"
        pageEncoding="UTF-8"%>
    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="UTF-8">
    <title>Insert title here</title>
    </head>
    <body>
        <%
            String a = request.getParameter("shang");
            String b = request.getParameter("xia");
            String c = request.getParameter("gao");
            double shang = Double.parseDouble(a);
            double xia = Double.parseDouble(b);
            double gao = Double.parseDouble(c);
            out.print("梯形面积为:" + ((shang + xia) * gao / 2));
        %>
    </body>
    </html>

  • 相关阅读:
    转:SkipList跳表
    git操作
    JAVA小工具打包
    Java数字证书操作
    mysql创建数据库和用户
    解决node-sass安装不了的问题
    vscode + angular
    ng2 quickstart-primeng
    ng2 quickstart
    使用淘宝的npm代理下载模块
  • 原文地址:https://www.cnblogs.com/zqxxx/p/12548320.html
Copyright © 2011-2022 走看看