<%
if request.form("source")<>"form" then
heightImperial=54
heightFeet=4
heightInches=6
weightImperial=84
weightStones=6
weightPounds=0
end if
if request.form("heightImperial")<>"" and request.form("heightImperial")<>"0" then
heightImperial=Clng(request.form("heightImperial"))
heightFeet=Int(heightImperial/12)
heightInches=heightImperial-heightFeet*12
end if
if request.form("weightImperial")<>"" and request.form("weightImperial")<>"0" then
weightImperial=Clng(request.form("weightImperial"))
weightStones=Int(weightImperial/14)
weightPounds=weightImperial-weightStones*14
end if
%>
<%
if request.form("source")="form" then
bmi=(weightImperial*703)/(heightImperial*heightImperial)
BMIdisplay= Round(bmi, 1)
response.write "Body Mass Index = " & BMIdisplay
else
response.write " "
end if
%>
 
<%for count = 1 to Int(bmi)*10%><%if count < 185 then%><%end if%><%if count =>185 and count < 250 then%><%end if%><%if count=>250 and count< 300 then%><%end if%><%if count=>300 and count <350then%><%end if%><%if count=>350 and count< 400 then%><%end if%><%if count>400 and count< 600 then%><%end if%><%if count= 601 then%>+<%end if%><%next%>