linkedin facebook linkedin facebook nod32

Formada php arifmetik amallar

Muallif: Mengliyev Sh.

Qo`shilgan sana: 2017-11-24

Formada php arifmetik amallar

Formada ikkita input kiritish orqali turli amallar bajarilishini ko`rib chiqamiz:

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<title>Php amallar</title>

</head>

<body>

<form action="index.php" method="post" name="form" >

<p>a=<input name="a" type="text" size="20"></p>

<p>b=<input name="b" type="text" size="20"></p>

<p><input name="submit" type="submit" value="arifmetik amallar"></p>

</form>
<?php

$a = $_POST['a'];

$b = $_POST['b'];

$a=(int)$a;

$b=(int)$b;
$s=$a+$b;
echo "Yigindi=$s";
$s1=$a-$b;
echo" Ayirma= $s1";
$s2=$a*$b;
echo" Ko`paytma=$s2";
$a1=(real)$a;
$b1=(real)$b;
$s3=$a1/$b1;
echo" Bo`linma=$s3";

?>

</body>

</html>

1079 marta o`qildi.

Parol:
Eslab qolish.


Ro`yhatdan o`tish

testing

+998915878681

Siz o`z maxsulotingizni 3D reklama ko`rinishda bo`lishini xohlaysizmi? Unda xamkorlik qilamiz.

3D Reklama


Рейтинг@Mail.ru
Рейтинг@Mail.ru

Besucherzahler
счетчик посещений