Solution:
The file used in this exercise is Series.jsp. The file is saved in basic directory.
<html>
<body>
<h1>Displaying </h1>
<%
int res;
int j=2;
for(int i=1;i<11;i++)
{
res=j*i;
out.println(j + " * " + i + " = " + res);
out.println("<br>");
}
%>
</body>
</html>
The output of the program is as shown in Figure 6.1.
0 nhận xét:
Post a Comment