<%Dim gpa, letterGrade, rtext, gpaf
pgaf = 0%>
If Then Statements <br />
what is you number grade
<form method="post" action="if-then-else-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 & "!!!")
Else
If gpa >= 80 Then
letterGrade = "B"
rtext="Your almost there, you got a "
Response.Write(rtext & " " & letterGrade)
Else
If gpa >= 70 Then
letterGrade = "C"
rtext="You have to study, your almost there, you got a "
Response.Write(rtext & " " & letterGrade)
Else
If gpa >= 60 Then
letterGrade = "D"
rtext="You have to study, your almost there, you got a "
Response.Write(rtext & " " & letterGrade)
Else
If gpa <= 59 Then
letterGrade = "F"
rtext="Ohhh Boy, you got an "
Response.Write(rtext & " " & letterGrade)
End If
End If
End If
End If
End If
%></form>