영상
개념
<script>
/*
[문제]
28 이상 999 이하의 28의 배수 중에서
가장 큰 수를 출력하시오.
[정답]
980
*/
let result = 0;
let i = 28;
while(i <= 999) {
if(i % 28 == 0) {
// document.write(i + "<br>");
result = i;
}
i = i + 1;
}
console.log(result);
document.write(result);
</script>
Java
복사