<!DOCTYPE html>
<html>
<head>
<meta charset="EUC-KR">
<title>Insert title here</title>
<script>
function InputPrintStar(n) {
for (var i = n; i >= 1; i--) {
for (var o = i; o >= 1; o--) {
document.write("*");
}
document.write("<br>");
}
}
</script>
</head>
<body>
<script>
while (true) {
var inputNum = parseInt(prompt("정수를 입력하세요 : "));
InputPrintStar(inputNum);
var choiceReplay = prompt("계속 하시겠습니까? (Y / N)");
if (choiceReplay == "Y" || choiceReplay == "y") {
continue;
}
else if (choiceReplay == "N" || choiceReplay == "n") {
break;
}
}
</script>
</body>
</html>