오늘은 계속 문제만 풀었다!
내 방법
<%@page import="java.util.Calendar"%>
<%@ page language="java" contentType="text/html; charset=EUC-KR"
pageEncoding="EUC-KR"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="EUC-KR">
<title>Insert title here</title>
</head>
<body>
<%!
public String calDate(){
Calendar cal = Calendar.getInstance();
String day="";
String month="";
String year="";
cal.add(Calendar.YEAR,-1);
cal.add(Calendar.MONTH,-2);
cal.add(Calendar.DATE,-3);
cal.get(Calendar.DATE);
day = String.valueOf(cal.get(Calendar.DATE));
month = String.valueOf(cal.get(Calendar.MONTH)+1);
year = String.valueOf(cal.get(Calendar.YEAR));
return year+" "+month+" "+day;
}
%>
1년 2달 3일전 날짜 :
<%=
calDate()
%>
</body>
</html>
강사님 방법
<%@page import="java.util.Calendar"%>
<%@ page language="java" contentType="text/html; charset=EUC-KR"
pageEncoding="EUC-KR"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="EUC-KR">
<title>Insert title here</title>
</head>
<body>
<%!
public String calDate(){
Calendar cal = Calendar.getInstance();
String day="";
String month="";
String year="";
cal.add(Calendar.YEAR,-1);
cal.add(Calendar.MONTH,-2);
cal.add(Calendar.DATE,-3);
day = String.valueOf(cal.get(Calendar.DATE));
month = String.valueOf(cal.get(Calendar.MONTH)+1);
year = String.valueOf(cal.get(Calendar.YEAR));
return year+" - "+month+" - "+day;
}
%>
1년 2달 3일전 날짜 :
<%=
calDate()
%>
</body>
</html>
Circle.java
강사님 방법
package area;
public class Circle {
public double process(int r) {
return (int) (r*r*3.14);
}
}
내방법
package area;
public class Circle {
int r;
int area;
public int process(int r) {
return (int) (r*r*3.14);
}
public int getR() {
return r;
}
public int getArea() {
return area;
}
public void setArea(int area) {
this.area = area;
}
public void setR(int r) {
this.r = r;
}
}
useBean.jsp
강사님 방법
<%@ page language="java" contentType="text/html; charset=EUC-KR"
pageEncoding="EUC-KR"%>
<jsp:useBean class="area.Circle" id="circle"></jsp:useBean>
<body>
<h4>원의 면적 출력하기</h4>
<%
int num =10;
out.print("반지름이 10인 원의 면적은 "+circle.process(num));
%>
</body>
</html>
내방법
<%@page import="area.Circle"%>
<%@ page language="java" contentType="text/html; charset=EUC-KR"
pageEncoding="EUC-KR"%>
<jsp:useBean class="area.Circle" id="myBean"></jsp:useBean>
<!DOCTYPE html>
<html>
<head>
<meta charset="EUC-KR">
<title>Insert title here</title>
</head>
<body>
<h4>원의 면적 출력하기</h4>
반지름이 10인 원의 면적은
<% myBean.setR(10);
myBean.getR();
myBean.getArea();
%>
<%= myBean.process()%>
</body>
</html>
Rectangle.java
package area;
public class Rectangle {
public int process(int x, int y) {
return x*y;
}
}
useBean2.jsp
<%@ page language="java" contentType="text/html; charset=EUC-KR"
pageEncoding="EUC-KR"%>
<jsp:useBean class="area.Rectangle" id="rect"/>
<!DOCTYPE html>
<html>
<head>
<meta charset="EUC-KR">
<title>Insert title here</title>
</head>
<body>
<h4>사각형의 면적 출력하기</h4>
<%
int a =20;
int b =30;
out.print("가로 20, 세로 30인 사각형의 면적은 "+rect.process(a, b));
%>
</body>
</html>
src 폴더 area패키지에 GuGudan 클래스 작성하여 구구단을 구하는 process()메소드 생성
useBean3.jsp 만들어서 숫자 5에 대한 process()메소드를 이용한 구구단 출력
강사님
GuGuDan .java
package area;
public class GuGuDan {
public int process(int i,int j) {
return i * j;
}
}
useBean3.jsp
<%@ page language="java" contentType="text/html; charset=EUC-KR"
pageEncoding="EUC-KR"%>
<jsp:useBean class="area.GuGuDan" id="gugudan"/>
<h4>구구단 출력하기</h4>
<%
int num =5;
for(int i=1; i<10; i++){
out.print(num+"*"+i+"="+gugudan.process(num, i)+"<br>");
}
%>
Circle2.java 생성
package area;
public class Circle2 {
private int radius;
public int getRadius() {
return radius;
}
public void setRadius(int radius) {
this.radius = radius;
}
public double process(int i) {
return i*i*3.14;
}
}
circle.html
<!DOCTYPE html>
<html>
<head>
<meta charset="EUC-KR">
<title>Insert title here</title>
</head>
<body>
<form method="post" action="circleForm.jsp">
반지름 : <input type="text" name="radius"><br>
<input type="button" value="전송">
</form>
</body>
</html>
circleForm.jsp
<%@ page language="java" contentType="text/html; charset=EUC-KR"
pageEncoding="EUC-KR"%>
<jsp:useBean class="area.Circle2" id="circle"/>
<jsp:setProperty property="radius" name="circle"/>
<html>
<head>
<meta charset="EUC-KR">
<title>Insert title here</title>
</head>
<body>
<h4>당신이 입력한 정보입니다</h4>
<%
out.print("반지름이 "+circle.getRadius()+"인 원의 면적은 "
+circle.process(circle.getRadius()));
%>
</body>
</html>
Circle2.java 생성
package area;
public class Circle2 {
private int radius;
public int getRadius() {
return radius;
}
public void setRadius(int radius) {
this.radius = radius;
}
public double process(int i) {
return i*i*3.14;
}
}
circle.html
<!DOCTYPE html>
<html>
<head>
<meta charset="EUC-KR">
<title>Insert title here</title>
</head>
<body>
<form method="post" action="circleForm.jsp">
반지름 : <input type="text" name="radius"><br>
<input type="button" value="전송">
</form>
</body>
</html>
circleForm.jsp
<%@ page language="java" contentType="text/html; charset=EUC-KR"
pageEncoding="EUC-KR"%>
<jsp:useBean class="area.Circle2" id="circle"/>
<jsp:setProperty property="radius" name="circle"/>
<html>
<head>
<meta charset="EUC-KR">
<title>Insert title here</title>
</head>
<body>
<h4>당신이 입력한 정보입니다</h4>
<%
out.print("반지름이 "+circle.getRadius()+"인 원의 면적은 "
+circle.process(circle.getRadius()));
%>
</body>
</html>
Rectangle2.java
package area;
public class Rectangle2 {
private int width;
private int height;
public int process(int a, int b) {
return a*b;
}
public int getwidth() {
return width;
}
public void setwidth(int width) {
this.width = width;
}
public int getheight() {
return height;
}
public void setheight(int height) {
this.height = height;
}
}
rectangle.html
<!DOCTYPE html>
<html>
<head>
<meta charset="EUC-KR">
<title>Insert title here</title>
</head>
<body>
<form method="post" action="rectangleForm.jsp">
<p>
가로 : <input type="text" name="width">
</p>
<br>
<p>
세로 : <input type="text" name="height">
</p>
<br>
<input type="submit" value="전송">
</form>
</body>
</html>
rectangleForm.jsp
<%@ page language="java" contentType="text/html; charset=EUC-KR"
pageEncoding="EUC-KR"%>
<jsp:useBean class="area.Rectangle2" id="rectangle"/>
<jsp:setProperty property="*" name="rectangle"/>
<!DOCTYPE html>
<html>
<head>
<meta charset="EUC-KR">
<title>Insert title here</title>
</head>
<body>
<h4>당신이 입력한 정보입니다.</h4>
<%
out.print("가로길이가 "+rectangle.getwidth()+"이고, 세로길이가 "+rectangle.getheight()
+"인 사각형의 면적은"+rectangle.process(rectangle.getwidth(), rectangle.getheight()));
%>
</body>
</html>
Season.java
package question;
public class Season {
private int month;
public String process(int month) {
String result="";
switch (month) {
case 3:
case 4:
case 5:
result ="봄";
break;
case 6:
case 7:
case 8:
result ="여름";
break;
case 9:
case 10:
case 11:
result ="가을";
break;
case 12:
case 1:
case 2:
result ="겨울";
break;
}
return result;
}
public int getMonth() {
return month;
}
public void setMonth(int month) {
this.month = month;
}
}
season.html
<!DOCTYPE html>
<html>
<head>
<meta charset="EUC-KR">
<title>Insert title here</title>
</head>
<body>
<form method="post" action="seasonForm.jsp">
달을 입력하세요(1~12) : <input type="text" name="month"><br>
<input type="submit" value="전송">
</form>
</body>
</html>
seasonForm.jsp
<%@ page language="java" contentType="text/html; charset=EUC-KR"
pageEncoding="EUC-KR"%>
<jsp:useBean class="question.Season" id="season"/>
<jsp:setProperty property="month" name="season"/>
<!DOCTYPE html>
<html>
<head>
<meta charset="EUC-KR">
<title>Insert title here</title>
</head>
<body>
<h4>당신이 입력한 정보입니다.</h4>
<%
out.print("입력된 정수가 "+season.getMonth()+"은 계절이 "
+season.process(season.getMonth()));
%>
</body>
</html>
Won2dollar.java
package question;
public class Won2dollar {
private int won;
public double process(int i) {
return i/1200.0;
}
public int getWon() {
return won;
}
public void setWon(int won) {
this.won = won;
}
}
Won2dollar.html
<!DOCTYPE html>
<html>
<head>
<meta charset="EUC-KR">
<title>Insert title here</title>
</head>
<body>
<form method="post" action="won2dollarForm.jsp">
<p>
원화를 입력하세요.(단위 원) : <input type="text" name="won">
</p>
<br>
<input type="submit" value="전송">
</form>
</body>
</html>
Won2dollarForm.jsp
<%@ page language="java" contentType="text/html; charset=EUC-KR"
pageEncoding="EUC-KR"%>
<jsp:useBean class="question.Won2dollar" id="Won2dollar"/>
<jsp:setProperty property="won" name="Won2dollar"/>
<!DOCTYPE html>
<html>
<head>
<meta charset="EUC-KR">
<title>Insert title here</title>
</head>
<body>
<h4>당신이 입력한 정보입니다.</h4>
<%
out.print("입력된 원화가 "+Won2dollar.getWon()+"원은 $"
+Won2dollar.process(Won2dollar.getWon()));
%>
</body>
</html>
Three.java
package question;
public class Three {
private int num;
public String process(int i){
String result ="";
if (i%3 == 0) {
result="3의 배수입니다.";
}else {
result ="3의 배수가 아닙니다.";
}
return result;
}
public int getNum() {
return num;
}
public void setNum(int num) {
this.num = num;
}
}
three.html
<!DOCTYPE html>
<html>
<head>
<meta charset="EUC-KR">
<title>Insert title here</title>
</head>
<body>
<form method="post" action="threeForm.jsp">
<p> 입력된 수 : <input type="text" name="num"></p>
<input type="submit" value="전송">
</form>
</body>
</html>
threeForm.jsp
<%@ page language="java" contentType="text/html; charset=EUC-KR"
pageEncoding="EUC-KR"%>
<jsp:useBean class="question.Three" id="three"/>
<jsp:setProperty property="num" name="three"/>
<!DOCTYPE html>
<html>
<head>
<meta charset="EUC-KR">
<title>Insert title here</title>
</head>
<body>
<h4>당신이 입력한 정보입니다.</h4>
<%
out.print("입력된 수가 "+three.getNum()+"은 "
+three.process(three.getNum()));
%>
</body>
</html>
DivAndRemains.java
package question;
public class DivAndRemains {
private int num;
public String process(int i) {
String result ="";
int ten = i / 10;
int one = i % 10;
if (ten==one) {
result="10의 자리와 1의 자리가 같습니다.";
}else {
result="10의 자리와 1의 자리가 다릅니다.";
}
return result;
}
public int getNum() {
return num;
}
public void setNum(int num) {
this.num = num;
}
}
divAndRemains.html
<!DOCTYPE html>
<html>
<head>
<meta charset="EUC-KR">
<title>Insert title here</title>
</head>
<body>
<form method="post" action="divAndRemainsForm.jsp">
<p>
2자리수 정수(10~99) 입력 : <input type="text" name="num">
<!-- 기존 java 파일의 값을 name에 넣어줘야함 -->
</p>
<br>
<input type="submit" value="전송">
</form>
</body>
</html>
divAndRemainsForm.jsp
<%@ page language="java" contentType="text/html; charset=EUC-KR"
pageEncoding="EUC-KR"%>
<jsp:useBean class = "question.DivAndRemains" id="divAndRemains"/>
<jsp:setProperty property="num" name ="divAndRemains"/>
<!DOCTYPE html>
<html>
<head>
<meta charset="EUC-KR">
<title>Insert title here</title>
</head>
<body>
<h4>당신이 입력한 정보입니다.</h4>
<%
out.print("입력된 정수가 "+divAndRemains.getNum()+"은 "
+divAndRemains.process(divAndRemains.getNum()));
%>
</body>
</html>
Rectangle.java
package question;
public class Rectangle {
private int x;
private int y;
public int getX() {
return x;
}
public void setX(int x) {
this.x = x;
}
public int getY() {
return y;
}
public void setY(int y) {
this.y = y;
}
public String process(int x,int y) {
String result ="";
if ((100<=x&&x<=200)&&(100<=y&&y<=200)) {
result = " 사각형 안에 있습니다.";
}else {
result = "사각형 안에 없습니다.";
}
return result;
}
}
rectangle2.html
<!DOCTYPE html>
<html>
<head>
<meta charset="EUC-KR">
<title>Insert title here</title>
</head>
<body>
<form method="post" action="rectangle2Form.jsp">
<p>
X 좌표 : <input type="text" name ="x">
</p>
<p>
Y 좌표 : <input type="text" name ="y">
</p>
<input type="submit" value="전송">
</form>
</body>
</html>
rectangle2Form.jsp
<%@ page language="java" contentType="text/html; charset=EUC-KR"
pageEncoding="EUC-KR"%>
<jsp:useBean class="question.Rectangle" id="rect"/>
<jsp:setProperty property="*" name="rect"/>
<!DOCTYPE html>
<html>
<head>
<meta charset="EUC-KR">
<title>Insert title here</title>
</head>
<body>
<h4>당신이 입력한 정보입니다. </h4>
<%
out.print("("+rect.getX()+","+rect.getY()+")는 "
+rect.process(rect.getX(), rect.getY()));
%>
</body>
</html>
Median.java
package question;
public class Median {
private int a;
private int b;
private int c;
public int getA() {
return a;
}
public void setA(int a) {
this.a = a;
}
public int getB() {
return b;
}
public void setB(int b) {
this.b = b;
}
public int getC() {
return c;
}
public void setC(int c) {
this.c = c;
}
public String process() {
String result = "";
if (a<b&&b<c||c<b&&b<a) {
result="입력된 정수가 "+a+"와 "+b+"와 "+c+"의 중간값은 "+b;
}else if(a<c&&c<b||b<c&&c<a) {
result="입력된 정수가 "+a+"와 "+b+"와 "+c+"의 중간값은 "+c;
}else if (b<a&&a<c||c<a&&a<b) {
result="입력된 정수가 "+a+"와 "+b+"와 "+c+"의 중간값은 "+a;
}
return result;
}
}
median.html
<!DOCTYPE html>
<html>
<head>
<meta charset="EUC-KR">
<title>Insert title here</title>
</head>
<body>
<form method="post" action="medianForm.jsp">
<p>첫번째 정수 입력 : <input type="text" name="a"></p>
<p>두번째 정수 입력 : <input type="text" name="b"></p>
<p>세번째 정수 입력 : <input type="text" name="c"></p>
<input type="submit" value="전송">
</form>
</body>
</html>
medianForm.jsp
<%@ page language="java" contentType="text/html; charset=EUC-KR"
pageEncoding="EUC-KR"%>
<jsp:useBean class="question.Median" id="median"/>
<jsp:setProperty property="*" name="median"/>
<!DOCTYPE html>
<html>
<head>
<meta charset="EUC-KR">
<title>Insert title here</title>
</head>
<body>
<h4>당신이 입력한 정보입니다.</h4>
<% out.print(median.process()); %>
</body>
</html>
Arithmetic
package question;
public class Arithmetic {
private int num1;
private int num2;
String opertor="";
public int getNum1() {
return num1;
}
public void setNum1(int num1) {
this.num1 = num1;
}
public int getNum2() {
return num2;
}
public void setNum2(int num2) {
this.num2 = num2;
}
public String getOpertor() {
return opertor;
}
public void setOpertor(String opertor) {
this.opertor = opertor;
}
public String process() {
String result ="";
switch (opertor) {
case "+":
result = String.valueOf(num1+num2);
break;
case "-":
result = String.valueOf(num1-num2);
break;
case "*":
result = String.valueOf(num1*num2);
break;
case "/":
if (num2==0) {
result="0으로 나눌 수 없습니다.";
}else {
result = String.valueOf(num1/num2);
}
break;
default: result="사칙연산이 아닙니다.";
break;
}
return result;
}
}
강사님 방법
package question;
public class Arithmetic {
private int num1;
private int num2;
String opertor="";
public int getNum1() {
return num1;
}
public void setNum1(int num1) {
this.num1 = num1;
}
public int getNum2() {
return num2;
}
public void setNum2(int num2) {
this.num2 = num2;
}
public String getOpertor() {
return opertor;
}
public void setOpertor(String opertor) {
this.opertor = opertor;
}
public String process() {
String result ="";
int res = 0;
switch (opertor) {
case "+":
res = num1+num2;
break;
case "-":
res = num1-num2;
break;
case "*":
res = num1*num2;
break;
case "/":
if (num2==0) {
result="0으로 나눌 수 없습니다.";
}else {
res =num1/num2;
}
break;
default: result="사칙연산이 아닙니다.";
break;
}
result=num1+opertor+num2+"의 계산 결과는 "+res;
return result;
}
}
arithmetic.html
<!DOCTYPE html>
<html>
<head>
<meta charset="EUC-KR">
<title>Insert title here</title>
</head>
<body>
<form method="post" action="arithmeticForm.jsp">
<p>첫번째 정수 입력 : <input type="text" name="num1"></p>
<p>첫번째 연산자 입력 : <input type="text" name="opertor"></p>
<p>두번째 정수 입력 : <input type="text" name="num2"></p>
<input type="submit" value="전송">
</form>
</body>
</html>
arithmeticForm.jsp
<%@ page language="java" contentType="text/html; charset=EUC-KR"
pageEncoding="EUC-KR"%>
<jsp:useBean class="question.Arithmetic" id="arithmetic"/>
<jsp:setProperty property="*" name="arithmetic"/>
<!DOCTYPE html>
<html>
<head>
<meta charset="EUC-KR">
<title>Insert title here</title>
</head>
<body>
<h4>당신이 입력한 정보입니다.</h4>
<%
out.print(arithmetic.getNum1()+"와 "+arithmetic.getNum2()
+"의 계산 결과는 "+arithmetic.process());
%>
</body>
</html>
강사님 방법
<%@ page language="java" contentType="text/html; charset=EUC-KR"
pageEncoding="EUC-KR"%>
<jsp:useBean class="question.Arithmetic" id="arithmetic"/>
<jsp:setProperty property="*" name="arithmetic"/>
<!DOCTYPE html>
<html>
<head>
<meta charset="EUC-KR">
<title>Insert title here</title>
</head>
<body>
<h4>당신이 입력한 정보입니다.</h4>
<%
out.print(arithmetic.getNum1()+"와 "+arithmetic.getNum2()
+"의 계산 결과는 "+arithmetic.process());
%>
</body>
</html>
EvenNumber.java
package question;
public class EvenNumber {
private int num;
public int getNum() {
return num;
}
public void setNum(int num) {
this.num = num;
}
public int process(int num) {
int result = 0;
for (int i = 1; i <= num; i++) {
if (i%2==0) {
result=result+i;
}
}
return result;
}
}
/강사님 방법
package question;
public class EvenNumber {
private int num;
public int getNum() {
return num;
}
public void setNum(int num) {
this.num = num;
}
public int process() {
int result = 0;
for (int i = 1; i <= num; i+=2) {
result+=i;
}
return result;
}
}
evenNumber.html
<!DOCTYPE html>
<html>
<head>
<meta charset="EUC-KR">
<title>Insert title here</title>
</head>
<body>
<form method="post" action="evenNumberForm.jsp">
<p>1~99 사이의 정수 입력 : <input type="text" name="num"> </p>
<input type="submit" value="전송">
</form>
</body>
</html>
evenNumberForm.jsp
<%@ page language="java" contentType="text/html; charset=EUC-KR"
pageEncoding="EUC-KR"%>
<jsp:useBean class="question.EvenNumber" id="even"/>
<jsp:setProperty property="num" name="even"/>
<!DOCTYPE html>
<html>
<head>
<meta charset="EUC-KR">
<title>Insert title here</title>
</head>
<body>
<%
out.print("입력된 정수가 "+even.getNum()+"의 짝수들의 합계는 "
+even.process(even.getNum()));
%>
</body>
</html>
Multiple.java
package question;
public class Multiple {
private int num;
public String process() {
String result="";
String result1="";
String result2="";
String result3="";
String result4="";
if (num%3==0) {
result1="3의 배수이다."+"\n";
}
if (num%5==0) {
result2="5의 배수이다."+"\n";
}
if (num%8==0) {
result3="8의 배수이다.";
}
if(num%3!=0||num%5!=0||num%8!=0) {
result4="어느 배수도 아니다.";
}
result = result1+result2+result3+result4;
return result;
}
public int getNum() {
return num;
}
public void setNum(int num) {
this.num = num;
}
}
/강사님 방법
package question;
import org.apache.jasper.tagplugins.jstl.core.If;
public class Multiple {
private int num;
public String process() {
boolean mutiple = false;
StringBuffer stBuffer = new StringBuffer();
if (num%3==0) {
stBuffer.append("3의 배수이다.<br>");
}
if (num%5==0) {
stBuffer.append("5의 배수이다.<br>");
}
if (num%8==0) {
stBuffer.append("8의 배수이다.<br>");
}
if (!mutiple) {
stBuffer.append("어느 배수도 아니다.");
}
return stBuffer.toString();
}
public int getNum() {
return num;
}
public void setNum(int num) {
this.num = num;
}
}
multiple.html
<!DOCTYPE html>
<html>
<head>
<meta charset="EUC-KR">
<title>Insert title here</title>
</head>
<body>
<form method="post" action="multipleForm.jsp">
<p>
양의 정수 입력 : <input type="text" name="num">
</p>
<input type="submit" value="전송">
</form>
</body>
</html>
multipleForm.jsp
<%@ page language="java" contentType="text/html; charset=EUC-KR"
pageEncoding="EUC-KR"%>
<jsp:useBean class="question.Multiple" id="mutiple"/>
<jsp:setProperty property="num" name="mutiple"/>
<!DOCTYPE html>
<html>
<head>
<meta charset="EUC-KR">
<title>Insert title here</title>
</head>
<body>
<%
out.print("입력된 정수가 "+mutiple.getNum()+"는 "+mutiple.process());
%>
</body>
</html>
Triangle.java
package question;
public class Triangle {
private int num1;
private int num2;
private int num3;
public int getNum1() {
return num1;
}
public void setNum1(int num1) {
this.num1 = num1;
}
public int getNum2() {
return num2;
}
public void setNum2(int num2) {
this.num2 = num2;
}
public int getNum3() {
return num3;
}
public void setNum3(int num3) {
this.num3 = num3;
}
public String process() {
String result = "";
if ((num1+num2)<=num3||(num1+num3)<=num2||(num2+num3)<=num1) {
result =num1+"와 "+num2+"와 "+num3+"은 삼각형이 되지 않습니다.";
}else {
result =num1+"와 "+num2+"와 "+num3+"은 삼각형이 됩니다.";
}
return result;
}
}
triangle.html
<!DOCTYPE html>
<html>
<head>
<meta charset="EUC-KR">
<title>Insert title here</title>
</head>
<body>
<form method="post" action="multipleForm.jsp">
<p>
양의 정수 입력 : <input type="text" name="num">
</p>
<input type="submit" value="전송">
</form>
</body>
</html>
triangleForm.jsp
<%@ page language="java" contentType="text/html; charset=EUC-KR"
pageEncoding="EUC-KR"%>
<jsp:useBean class="question.Triangle" id="triangle"/>
<jsp:setProperty property="*" name="triangle"/>
<!DOCTYPE html>
<html>
<head>
<meta charset="EUC-KR">
<title>Insert title here</title>
</head>
<body>
<h4>당신이 입력한 정보입니다.</h4>
<%
out.print("입력된 3변의 값이 "+triangle.process());
%>
</body>
</html>