JSP jsp좀 가르쳐주세요..
[jsp공법시방서 제이스피드]이런식으로
2단3단4단5단
2*1〃〃〃
2*2
2*9
6단7단8단9단
〃〃〃〃
이렇게 만들려면 어떻게 해야하는지설명이랑 출력화면좀 올려주시면 감사하겠습니다
==================답변====================
out.print("table board=1");for(int i=0 ; i 20 ; i++)[out.print("tr");for (int j=2 ; j 6 ; j++)[if(i == 0 )[if(j==5)out.println("td width=80"+j + "단/td/tr");// 5단에서 한줄 넘김elseout.println("td width=80"+j + "단/td"); ]else if(i == 10)[if(j==5)out.println("td"+ (j+4) + "단/td/tr");// 9단에서 한줄 넘김elseout.println("td"+ (j+4) + "단/td"); ]else[if(j==5)[if(i 10)out.println("td"+ (j+4) +"*" +i%10 + "=" + (i%10) * (j+4) + "/td/tr"); elseout.println("td"+j+"*" +i+ "=" +i* j+ "/td/tr"); ]else[if(i 10)out.println("td"+ (j+4)+"*" + i%10 + "=" + (i%10) * (j+4) + "/td"); elseout.println("td"+ j+"*" + i+ "=" + i*j+ "/td"); ]]
]]out.print("/table");
br />
out.print("");
for(int i=0 ; i br />
out.print("");
for (int j=2 ; j br />
if(i == 0 )[
if(j==5) out.println(""+j + "단"); // 5단에서 한줄 넘김
else out.println(""+j + "단");
]else if(i == 10)[
if(j==5) out.println(""+ (j+4) + "단"); // 9단에서 한줄 넘김
else out.println(""+ (j+4) + "단");
]else[
if(j==5)[
if(i > 10) out.println(""+ (j+4) +"*" +i%10 + "=" + (i%10) * (j+4) + "");
else out.println(""+ j +"*" +i + "=" + i * j + "");
]else[
if(i > 10) out.println(""+ (j+4)+"*" + i%10 + "=" + (i%10) * (j+4) + "");
else out.println(""+ j +"*" + i + "=" + i*j + "");
]
]
]
]
out.print("");
%>