asp编程考试

来源:百度知道 编辑:UC知道 时间:2024/05/24 09:49:46
1.编程实现一个3*3的表格,单元格内容为“第几行、第几列”
2.编程实现百钱买百鸡,公鸡五钱一只,母鸡三钱一只,小鸡一钱三只
3.设计一个信息表单,输出提交信息
4.编程实现将一数据库中的一表中所有数据输出
快速~~~~~等待中~~~~~~

1.
<%
dim i,j
response.write"<table>"
for i=1 to 3
response.write"<tr>"
for j=1 to 3
response.write"<td>第"&i&"行、第"&j&"列</td>"
next
response.write"</tr>"
next
response.write"</table>"
%>
2.
<%
dim i,j,k
for i=1 to int(100/5)
for j=1 to int(100/3)
if (100-i-j) mod 3=0 and i*5+j*3+(100-i-j)/3=100 then
response.write "公鸡="&i&"<br>母鸡="&j&"<br>小鸡="&(100-i-j)
exit for
next
next
%>
3.
<html>
<body>
<%
dim a:a=request.from("a")
dim action:action=request.querystring("b")
if action="write" then
response.write"您提交的是:"&a
else
response.write"<form name='form1' method='post' action='"&Request