-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInchToCm.html
More file actions
30 lines (23 loc) · 872 Bytes
/
InchToCm.html
File metadata and controls
30 lines (23 loc) · 872 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
</head>
<body>
<script>
const input = prompt('inch 단위의 숫자를 입력해주세요~')
const inch = Number(input)
const cm = inch * 2.54
alert(`${inch}inch는 ${cm}cm 입니다.`)
const cminput = prompt("cm를 inch로 바꿔드립니다 cm를 입력하세요")
const inch1 = Number(cminput)
const inchoutput = inch1 * 0.393701
alert(`${cminput}cm는 ${inchoutput}inch 입니다.`);
const cminput1 = prompt("cm를 inch로 바꿔드립니다 cm를 입력하세요2222")
const inchoutput2 = cminput1 * 0.393701
alert(`${cminput1}cm는 ${inchoutput2}inch 입니다2222.`);
</script>
</body>
</html>