java web第一次作业

输入hello

<%--
Created by IntelliJ IDEA.
User: bad boy
Date: 2022/3/4
Time: 21:48
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>$Title$</title>
</head>
<body>
HELLO
</body>
</html>

 

输出字母表

 <%--
Created by IntelliJ IDEA.
User: bad boy
Date: 2022/3/4
Time: 21:48
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>字母表</title>
</head>
<body>
<p>
<br>英文字母表</br>
</p>

<p style="font-family: 新宋体;font-size: 25px;color: black">


<%
char A;
char a;
for(A='A';A<='Z';A++){
out.print(A+"("+((char)(A+32))+")"+" ");
}
%>
</p>
</body>
</html>

 

 九九乘法表

<%--
Created by IntelliJ IDEA.
User: bad boy
Date: 2022/3/4
Time: 21:48
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>字母表</title>
</head>
<body>
<p>
<br>九九乘法表</br>
</p>

<p style="font-family: 新宋体;font-size: 25px;color: black">


<%
for (int i=1;i<=9;i++){
for (int j=1;j<=i;j++){
out.print(i+"*"+j+"="+i*j+" ");
}
out.print("<br>");
}
%>
</p>
</body>
</html>

 

posted @ 2022-03-04 22:50  高杨翔  阅读(25)  评论(0编辑  收藏  举报