<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script src="./09-2.js"></script>
</body>
</html>
var sum1 = prompt ("请输入一个数字") * 1;
var sum2 = prompt ("请输入一个数字") * 1;
var sum3 = prompt ("请输入一个数字") * 1;
var sum4 = prompt ("请输入一个数字") * 1;
var sum5 = prompt ("请输入一个数字") * 1;
var newsum = [];
newsum[0] = sum1;
newsum[1] = sum2;
newsum[2] = sum3;
newsum[3] = sum4;
newsum[4] = sum5;
var maxNum = newsum[0];
for (var i=1;i<sum1.length;i++){
if(newsum[i]>maxNum){
maxNum = newsum[i];
}
}
document.write(maxNum);