用ASP输出九九乘法口决表的网页
编辑: 面试啦 发布时间: 2023-08-21 17:16:39
输出如下:
1*1=1
1*2=2 2*2=4
1*3=3 2*3=6 3*3=9
———————-
———————-
请写出完整的ASP代码程序。
用ASP输出九九乘法口决表的网页
输出如下:
1*1=1
1*2=2 2*2=4
1*3=3 2*3=6 3*3=9
请写出完整的ASP代码程序。
参考答案如下:
方法1:
九九乘法表
方法2:
<%
dim a,b
a=1
while a<=9
for b=a to 9
response.Write cstr(a)&”*”&cstr(b)&”=”&cstr(a*b)&”"
next
response.Write”
”
a=a+1
wend
%>
方法3:
<%for i=1 to 9%>
<%for j=1 to i%>
<%if j*i<10 then
response.write j&”*”&i&”=”&j*i&” “&” ”
else
response.write j&”*”&i&”=”&j*i&” ”
end if
%>
<%next%>
<%=”
”%>
<%for k=i+1 to 9%>
<%=” “%>
<%next%>
<%next%>
1*1=1
1*2=2 2*2=4
1*3=3 2*3=6 3*3=9
———————-
———————-
请写出完整的ASP代码程序。
用ASP输出九九乘法口决表的网页
输出如下:
1*1=1
1*2=2 2*2=4
1*3=3 2*3=6 3*3=9
请写出完整的ASP代码程序。
参考答案如下:
方法1:
<%=j&”*”&i&”=”&j*i%> <%next%> | <%=” “%> <%next%> |
方法2:
<%
dim a,b
a=1
while a<=9
for b=a to 9
response.Write cstr(a)&”*”&cstr(b)&”=”&cstr(a*b)&”"
next
response.Write”
”
a=a+1
wend
%>
方法3:
<%for i=1 to 9%>
<%for j=1 to i%>
<%if j*i<10 then
response.write j&”*”&i&”=”&j*i&” “&” ”
else
response.write j&”*”&i&”=”&j*i&” ”
end if
%>
<%next%>
<%=”
”%>
<%for k=i+1 to 9%>
<%=” “%>
<%next%>
<%next%>
词条:aspnet面试题
上一篇:南京华招网笔试题 下一篇:ASP.NET中内置对象是什么
面试题库导航
- C++面试题
- JAVA面试题
- Oracle面试题
- MySQL面试题
- Linux面试题
- 网络工程师面试题
- 网管面试题
- 软件工程师面试题
- PHP面试题
- .net面试题
- 软件测试面试题
- EJB面试题
- Spring面试题
- Javascript面试题
- Python面试题
- QTP面试题
- Servlet面试题
- J2EE面试题
- Database面试题
- ASP面试题
- Unix面试题
- Loadrunner面试题
- 通信面试题
- 嵌入式面试题
- Ruby面试题
- Delphi面试题
- Mobile开发面试题
- SOA面试题
- JAVA面试题面试题
- 研发工程师面试题
- 软件架构师面试题
- 系统工程师面试题
- Android面试题
- JAVA程序员
- C#面试题