懂ASP编码的朋友!!!!

来源:百度知道 编辑:UC知道 时间:2024/06/27 10:54:20
我按照题目写了答案,但是在IE里显示代码有缺漏,可是我找不出来
题目是这样的:
“请给出性别及年龄,对应输出以下的信息:

男 8岁以下 小弟弟
8岁到15岁 小男孩
16岁到24岁 小伙子
25岁到45岁 青年男子
46岁到55岁 中年男子
56岁到80岁 老爷爷
81岁以上 老寿星
女 8岁以下 小妹妹
8岁到15岁 小女孩
16岁到24岁 小姑娘
25岁到45岁 青年女子
46岁到55岁 中年女子
56岁到80岁 奶奶
81岁以上 老奶奶”
-------------------------------------------------------------------
接下来是我写的代码:(请帮我检查一下是哪行出错了,谢谢!!!!!)

<%
dim age,sex
age= 50
sex="男"
if sex="男" then
if age<8 then
response.write("小弟弟")
else
if age>=8 and age<15 then
response.write("小男孩")
else
if age>=15 and age<24 then
response.write("小伙子")
else
if age>=24 and age<45 then
response.write("青年男子")
else
i

<%
dim age,sex
age= 50
sex="男"
if sex="男" then
if age<8 then
response.write("小弟弟")
elseif age>=8 and age<15 then
response.write("小男孩")
elseif age>=15 and age<24 then
response.write("小伙子")
elseif age>=24 and age<45 then
response.write("青年男子")
elseif age>=45 and age<55 then
response.write("中年男子")
elseif age>=55 and age<80 then
response.write("老爷爷")
elseif age>80 then
response.write("老寿星")
end if
else

if age<8 then
response.write("小妹妹")
elseif age>=8 and age<15 then
response.write("小女孩")
elseif age>=15 and age<24 then
response.write("小姑娘")
elseif age>=24 and age< 45 then
response.write("年轻女子")
elseif age>=45 and age<