Showing posts with label addition in php. Show all posts
Showing posts with label addition in php. Show all posts

Saturday, 29 June 2013

Arithametic operations in php

<html>
<head><title>arthematic operators</title>
</head>
<body>
<?php
$i=12;
$j=4;

$add=$i+$j;
$sub=$i-$j;
$mul=$i*$j*$k;
echo "Addition of i=".$i." " ."and j=".$j." "." :"." "."i+j=".$add."<br/>";

echo "Substraction of i and j :"." ".$sub."<br/>";

echo "Multification of i and j :"." ".$mul."<br/>";


?>
</body>
</html>

Friday, 28 June 2013

Addition in PHP

<html>
<head>
<title></title>
</head>
<body>
<?php

$n1=20;
$n2=10;
$add=$n1+$n2;
$sub=$n1-$n2;
echo "Addition of n1 and n2 is: "." ".$add;
echo "<br/>";
echo $sub;

?>
</body>
</html>