<HTML>
<HEAD>
<TITLE>Nested if Statements</TITLE>
</HEAD>
<BODY>
<H1>Nested if Statements</H1>
<%
double value = 2;
if (value != 0) {
if (value > 0)
out.println("The result = " + (1 / value));
else
out.println("Sorry, we need a positive number.");
}
%>
</BODY>
</HTML>