Mualliflar




Download 7,87 Mb.
bet18/18
Sana04.06.2024
Hajmi7,87 Mb.
#260111
1   ...   10   11   12   13   14   15   16   17   18
Bog'liq
b

Math.cos(a) a sonining kosinusini hisoblaydi.

Java Scriptda formalar hosil qilish va matematik hisob ishlarini bajarish uchun Windows operatsion sistemasining bloknot matn muharriridan foyda- lanib, HTML kodi ichida, asosan tegi orasida yoziladi.
l-mashq. Java Scriptda uchburchakning yuzasini Geron formulasidan foydalanib hisoblovchi forma oynasini hosil qilish. (S=1(p(p-a)(p-b)(p-c)), p=(a+b+c)/2, a, b, c — uchburchak tomonlari uzunliklari).
Bajarish:

  1. Bloknot matn muharriri yuklanadi.

  2. Dastur1ash maydoniga quyidagi dastur kodi yoziladi:

uchburchak</titled </head> <br /><body> co1or="green" size=5>Uchburchakning <a href="/qurilish-tashkilotlarida-mehnatga-haq-tolash-boyicha-hisob-kit.html">yuzasini hisob- lash </a><br /><script type="text/javascript"> function hisob() ( var a=1*document.myform.tomon1.value; <br />var b=1*document.myform.tomon2.value; var c=1*document.myform.tomon3.value; <br />if( ((a+b)>c) && ((a+c)>b) && ((b+c)>a)) ( var p=(a+b+c)/2; <br />var s=Math.sqrt(p*(p-a)*(p-b)*(p-c)); document.myform.javob.va1ue=s; } else ( <br />document.myform.javob.value="Berilgan qiymatlardan uchburchak ya- sab bo‘1maydi";} } </script> <form name="myform"> <br /><b> color="oooofI">Uchburchak tomonlari qiymatlarini kiriting: <br />a kesma uzunligi: <input type="text" size="20" name="tomon1"> Opt b kesma uzunligi: <input type="text" size="20" name="tomon2"> <br /> c kesma uzunligi: <input type="text" size="20" name="tomon3"> <br /> <br /><input type="button" value="Hisoblash" onclick="hisob()"> <br /><input type="reset" value="Yangi1ash"> <br />Opt <a href="/1-amaliy-mashgulot-mavzu-chiziqli-va-tarmoqlanuvchi-algoritmla-v2.html">Uchburchak yuzasi </a><input type="text" size="50" name="javob"> <br /></form> </input></input></input></input></input></input></body>
Download 7,87 Mb.
1   ...   10   11   12   13   14   15   16   17   18




Download 7,87 Mb.