1. 程式人生 > >7.21練習1

7.21練習1

title head body var 輸入 itl amp bsp set

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
</body>
</html>
<script type="text/javascript">
var x = prompt("請輸入三個數字")
var y = prompt("請輸入三個數字")
var z = prompt("請輸入三個數字")
if(x<y&&y<z){
alert(x+","+y+","+z)
}
else if(x<z&&z<y){
alert(x+","+z+","+y)
}
else if(y<z&&z<x){
alert(y+","+z+","+x)
}
else if(y<x&&x<z){
alert(y+","+x+","+z)
}
else if(z<x&&x<y){
alert(z+","+x+","+y)
}
else if(z<y&&y<x){
alert(z+","+y+","+x)
}
</script>

7.21練習1