diff --git "a/work/com/java/minxi/java_20240605/java_2302_\347\216\213\346\242\246\347\221\266_2344310232/circle.jsp" "b/work/com/java/minxi/java_20240605/java_2302_\347\216\213\346\242\246\347\221\266_2344310232/circle.jsp" new file mode 100644 index 0000000000000000000000000000000000000000..da31e5cda080369b3c4ad47afdfbedd9c29c8d73 --- /dev/null +++ "b/work/com/java/minxi/java_20240605/java_2302_\347\216\213\346\242\246\347\221\266_2344310232/circle.jsp" @@ -0,0 +1,22 @@ +<%@ page language="java" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" %> + + + + + 求圆的面积 + + + +

+
+ 计算圆的面积 +
+

+<% + String radiusStr = request.getParameter("radius"); + double radius = Double.parseDouble(radiusStr); + double area = Math.PI * Math.pow(radius,2); + out.println("圆的面积为:" + area); +%> + + \ No newline at end of file diff --git "a/work/com/java/minxi/java_20240605/java_2302_\347\216\213\346\242\246\347\221\266_2344310232/ladder.jsp" "b/work/com/java/minxi/java_20240605/java_2302_\347\216\213\346\242\246\347\221\266_2344310232/ladder.jsp" new file mode 100644 index 0000000000000000000000000000000000000000..b7ee5f424c64a548e461a6803bb01e7b17a86218 --- /dev/null +++ "b/work/com/java/minxi/java_20240605/java_2302_\347\216\213\346\242\246\347\221\266_2344310232/ladder.jsp" @@ -0,0 +1,19 @@ + + + + + 求梯形面积 + + +<% + String topStr = request.getParameter("top"); + String bottomStr = request.getParameter("bottom"); + String heightStr = request.getParameter("height"); + double top = Double.parseDouble(topStr); + double bottom = Double.parseDouble(bottomStr); + double height = Double.parseDouble(heightStr); + double area = (top + bottom) * height / 2; + out.println("梯形的面积为:" + area); +%> + + \ No newline at end of file diff --git "a/work/com/java/minxi/java_20240605/java_2302_\347\216\213\346\242\246\347\221\266_2344310232/main.jsp" "b/work/com/java/minxi/java_20240605/java_2302_\347\216\213\346\242\246\347\221\266_2344310232/main.jsp" new file mode 100644 index 0000000000000000000000000000000000000000..9c458d6b7bbf025c0b426bbf879242736934cb3e --- /dev/null +++ "b/work/com/java/minxi/java_20240605/java_2302_\347\216\213\346\242\246\347\221\266_2344310232/main.jsp" @@ -0,0 +1,17 @@ + + + + + Title + + + + + + + + + + + + \ No newline at end of file