<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<script>
function getMax(a,b,c,d,e) {
var maxNum;
maxNum=(a>b)?a:b;
maxNum=(maxNum>c)?maxNum:c;
maxNum=(maxNum>d)?maxNum:d;
maxNum=(maxNum>e)?maxNum:e;
return maxNum;
}
document.write("五个数中的最大值为:"+getMax(2,6,1,8,9));
</script>
</head>
<body>
</body>
</html>
求出任意五个数最大值
最新推荐文章于 2022-03-25 22:56:34 发布