2021-01-08 HTML 두 수 입력받아 계산하기

쪼레비·2021년 3월 30일
0
<!DOCTYPE html>
<html>
<head>
<meta charset="EUC-KR">
<title>Insert title here</title>

<script>
	function Maths (a, b){
		document.write((a+b) + "<br>");
		document.write((a-b) + "<br>");
		document.write((a*b) + "<br>");
		document.write((a/b) + "<br>");
	}
</script>

</head>
<body>

<script>
	var input = parseInt(prompt("첫번째 수 입력 : "));
	var input2 = parseInt(prompt("두번째 수 입력 : "));
	Maths(input, input2);
</script>
</body>
</html>
profile
잠팅이

0개의 댓글