第七次作业

这个作业属于哪个课程 https://edu.cnblogs.com/campus/sdscfz/SF4
这个作业要求在哪里 https://edu.cnblogs.com/campus/sdscfz/SF4/homework/12952
这个作业的目标 第7次作业-
<!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);
posted @ 2023-04-11 18:32  平林雳  阅读(23)  评论(0编辑  收藏  举报