13-20-guruh talabasi XANKELOV ABDUMUTALNING JAVASCRIPT DASTURLASH TILI FANIDAN 2-AMALIY ISHI <!DOCTYPE html> <html> <title>Javascript amaliy2</title> <body> <h1 style="text-align: center; color: red;">Xankelov Abdumutal</h1> <h2 style="text-align: center;">26 variant</h2> <p style="text-align: center;color:blue;">26.Ikkita x va y natural sonlari berilgan.Sizning vazifanigiz x dan kichik bolmagan y ga qoldiqsiz bolinadigan eng kichik natural sonni topishdan iborat</p> <label for="" ><h3 style="margin-left: 550px;">Son kiriting</h3></label> <input type="text" id="son1" style="margin-left: 550px; border: blue 2px solid;"> <label for="" ><h3 style="margin-left: 550px;">Son kiriting</h3></label> <input type="text" id="son2" style="margin-left: 550px; border: blue 2px solid;"><br><br> <button style="border: 2px solid black ;margin-left: 550px; width: 50px; height: 20px;" onclick="bolish()" >Natija</button> <p id="natija" style="font-size: 40px; color: blue; text-align: center;"></p> <script> function bolish() { let x=parseInt(document.getElementById("son1").value) let y=parseInt(document.getElementById("son2").value) for(let i=0;i<(x+y);i++){ if ((x+i)%y==0) { return y; } } } document.getElementById("natija").innerHTML = bolish(); </script> </body> </html>