<%Dim gpa, letterGrade, rtext, gpaf
pgaf = 0%>
If Then Statements <br />
what is you number grade
<form method="post" action="if-then-statements.asp"><input
name="gpaf" type="text" /><input name="" type="submit" value="Submit" />
<%
gpa = Request.Form("gpaf")
If gpa >= 90 Then
letterGrade = "A"
rtext="YOU GOT AN"
Response.Write(rtext & " " & letterGrade & "!!!")
End If
If (gpa >= 80) and (gpa <= 90) Then
letterGrade = "B"
rtext="Your almost there, you got a "
Response.Write(rtext & " " & letterGrade)
End If
If (gpa >= 70) and (gpa <= 79) Then
letterGrade = "C"
rtext="You have to study, your almost there, you got a "
Response.Write(rtext & " " & letterGrade)
End If
If (gpa >= 60) and (gpa <= 69) Then
letterGrade = "D"
rtext="You have to study, your almost there, you got a "
Response.Write(rtext & " " & letterGrade)
End If
If (gpa < 59) Then
letterGrade = "F"
rtext="Ohhh Boy, you got an "
Response.Write(rtext & " " & letterGrade)
End If
%></form>