第十二次作业

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
        <title>
            math
        </title>
    </head>
    <body>
        <script src="./math.js">
var g=Math.round(Math.random() * 10+1)
var i=0
while(i<=10){
    l=prompt('请输入0-10之间的整数')
    if(l<g){
        alert('你猜小了')
    }else{
        if(l>g){
        alert('你猜大了')
    }else{
        alert('你猜对了')
    }
     
    }
    i++
}
/script>
    </body>
</html>




posted @ 2023-05-28 18:44  乔文涛  阅读(4)  评论(0编辑  收藏  举报