Responsive Advertisement

Arithmetic Operators in Hindi

Arithmetic Operators में पांच प्रकार के Operators होते है |
OperatorsDescription
+Addition
-Subtraction
*Multiplication
/Division
%Modulus

Example for Addition(+)

Source Code :
123456<?php
$a = 10;
$b = 4;
$c = $a + $b;
echo "Addition of ".$a." and ".$b." is ".$c;
?>
Output :
Addition of 10 and 4 is 14

Example for Subtraction(-)

Source Code :
123456<?php
$a = 10;
$b = 4;
$c = $a - $b;
echo $c;
?>
Output :
6

Example for Multiplication(*)

Source Code :
123456<?php
$a = 10;
$b = 4;
$c = $a * $b;
echo $c;
?>
Output :
40

Example for Division(/)

Source Code :
123456<?php
$a = 10;
$b = 4;
$c = $a / $b;
echo $c;
?>
Output :
2.5

Example for Modulus(%)

Source Code :
1234567<?php
$a = 10;
$b = 4;
$c = $a % $b;

echo "Remainder : ".$c;
?>
Output :
Remainder : 2

Post a Comment

0 Comments