diff --git "a/work/com/java/minxi/java_20240603/java_2301_\347\216\213\346\230\276\344\271\211_2344310134/Main.jsp" "b/work/com/java/minxi/java_20240603/java_2301_\347\216\213\346\230\276\344\271\211_2344310134/Main.jsp" new file mode 100644 index 0000000000000000000000000000000000000000..489d8d3042c719503845ca6e4e437eae66e24fe5 --- /dev/null +++ "b/work/com/java/minxi/java_20240603/java_2301_\347\216\213\346\230\276\344\271\211_2344310134/Main.jsp" @@ -0,0 +1,21 @@ +<%@page language="java" contentType="text/html; charset=utf-8" pageEncoding="UTF-8" %> + + + Main 页面 + + +

Main 页面

+ +

圆的面积计算

+ + + + +

梯形面积计算

+ + + + + + + \ No newline at end of file diff --git "a/work/com/java/minxi/java_20240603/java_2301_\347\216\213\346\230\276\344\271\211_2344310134/circle.jsp" "b/work/com/java/minxi/java_20240603/java_2301_\347\216\213\346\230\276\344\271\211_2344310134/circle.jsp" new file mode 100644 index 0000000000000000000000000000000000000000..81b2cb7862925416ae0d8c54f588ce6d99ad00a1 --- /dev/null +++ "b/work/com/java/minxi/java_20240603/java_2301_\347\216\213\346\230\276\344\271\211_2344310134/circle.jsp" @@ -0,0 +1,20 @@ +<%@page language="java" contentType="text/html; charset=utf-8" pageEncoding="UTF-8" %> + +<% + String radiusStr = request.getParameter("radius"); + double radius = Double.parseDouble(radiusStr); + double area = Math.PI * radius * radius; + + +%> + + + + + 圆的面积 + + +

半径:<%=radius%>

+

面积:<%=area%>

+ + \ No newline at end of file diff --git "a/work/com/java/minxi/java_20240603/java_2301_\347\216\213\346\230\276\344\271\211_2344310134/ladder.jsp" "b/work/com/java/minxi/java_20240603/java_2301_\347\216\213\346\230\276\344\271\211_2344310134/ladder.jsp" new file mode 100644 index 0000000000000000000000000000000000000000..ec101fd4c4a955619ce9a12762c2fdc44dd65c5b --- /dev/null +++ "b/work/com/java/minxi/java_20240603/java_2301_\347\216\213\346\230\276\344\271\211_2344310134/ladder.jsp" @@ -0,0 +1,33 @@ +<%@page language="java" contentType="text/html; charset=utf-8" pageEncoding="UTF-8" %> + +<% + String topSet = request.getParameter("top"); + String bottomSet = request.getParameter("bottom"); + String heightSet = request.getParameter("height"); + + double top = Double.parseDouble(topSet); + double bottom = Double.parseDouble(bottomSet); + double height = Double.parseDouble(heightSet); + + double area = ((top + bottom) * height) / 2; + + + +%> + + + + + 梯形面积 + + +

上底:<%=top%>

+

下底:<%=bottom%>

+

高:<%=height%>

+

<%=area%>

+ + + + + +