第一周作业
1.
2.
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> 2 3 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 4 <html> 5 <head> 7 </head> 8 9 <body> 10 <h1>英文字母表</h1> 11 <% 12 for(char m='A';m<='Z';m++){ 13 out.print(m+"("+(char)(m+32)+")"+" "); 14 if(m=='M') 15 out.print("<br>"); 16 } 17 %> 18 </body> 19 </html>
3.
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> </head> <body> <p>九九乘法表:<p/> <% for(int j=1;j<=9;j++){ for(int i=1;i<=j;i++){ int n=i*j; out.print(i+"x"+j+"="+n+" "); } out.print("<br>"); } %> <br></body> </html>