PHP Programming Debugging Code Assignment
College of Technology Jaffna
Program 01:
<?php
$x=10;
$y=25
$z=$x+$y;
msg = 'Sum of x+y = ';
print($msg.$z)?>
Program 02:
<?php
$txt = Learn With Thiru!";
$x = 5;
$y = 10.5;
echo $txt;
echo "<br>;
echo $X;
echo "<br>";
echo $Y;
?>
Program 03:
<?php
$t = 39;
if ($t < "20") {
echo "Have a nice day!";
} else {
echo "Have a good morning!"
}
?>
Program 04:
<?php
$a = 42;
$b = 20
if( $a == $b ) {
echo " a is equal to b<br/>";
}else {
echo " a is not equal to b<br/>";
};
if( $a > $b ) {
echo " a is greater than b<br/>";
}else {
echo a is not greater than b<br/>";
};
Program 05:
<?php
$a = 42;
$b = 20
$c = $a + $b;
echo "Addtion Operation $c <br/"
$c = $a - $b;
echo "Substraction Operation $c br/>"
$c = $a * $b;
echo "Multiplication Operation $c <br/>
$c = $a / $b;
echo "Division Operation $c <br/>"
$c = $a % $b;
echo Modulus Operation $c <br/>"
$c = $a++;
echo "Increment Operation $c br/>"
$c = $a--;
echo "Decrement Operation $c <br/>"
?>
.PHP Programming |
48 Comments
A.vithushalini
ReplyDeletepro:01
<?php
$x=10;
$y=25;
$z=$x+$y;
echo"Sum of x+y =".$z;
?>
Received for the evaluation. Good..
Deleteprogram 01 (N.Gothanya)
ReplyDelete<?php
$x=10;
$y=25;
$z=$x+$y;
echo" Sum of x+y = ",$z;
?>
Received for the evaluation. Good..
Deleteprogram 2
ReplyDelete";
echo $x;
echo "
";
echo $y;
?>
Received for the evaluation. Good..
DeleteA.vithushalini
ReplyDeletepro:02
";
echo $x;
echo"
";
echo $y;
?>
Received for the evaluation. Good..
Deleteprogram 3
ReplyDeleteA.Vithushalini
ReplyDeletePro:03
program 4
ReplyDelete";
}
else
{
echo " a is not equal to b
";
}
if( $a > $b )
{
echo " a is greater than
";
}
else
{
echo " a is not greater than b
";
}
?>
A.vithushalini
ReplyDeletepro:05
";
$c = $a - $b;
echo "Substraction Operation $c
";
$c = $a * $b;
echo "Multiplication Operation $c
";
$c = $a / $b;
echo "Division Operation $c
";
$c = $a % $b;
echo "Modulus Operation $c
";
$c = $a++;
echo "Increment Operation $c
";
$c = $a--;
echo "Decrement Operation $c
";
?>
tharmatha.v
ReplyDelete<?php
ReplyDelete//Program 1 Kipitha.J
$x=10;
$y=25;
$z=$x+$y;
echo ("Sum of x+y = ".$z);
?>
A.Vithushalini
ReplyDeletePro:04
";
}
else
{
echo " a is not equal to b
";
}
if( $a > $b )
{
echo " a is greater than b
";
}
else
{
echo "a is not greater than b
";
}
?>
program 5
ReplyDelete";
$c = $a * $b;
echo "Multiplication Operation $c
";
$c = $a / $b;
echo "Division Operation $c
";
$c = $a % $b;
echo "Modulus Operation $c
";
$c = $a++;
echo "Increment Operation $c
";
$a = 43;
$c = $a--;
echo "Decrement Operation $c
";
?>
$a = 42;
ReplyDelete$b = 20;
$c = $a + $b;
echo "Addtion Operation $c
";
$c = $a - $b;
echo "Substraction Operation $c
";
$c = $a * $b;
echo "Multiplication Operation $c
";
$c = $a / $b;
echo "Division Operation $c
";
$c = $a % $b;
echo "Modulus Operation $c
";
$c = $a++;
echo "Increment Operation $c
";
$c = $a--;
echo "Decrement Operation $c
";
?>
This comment has been removed by the author.
ReplyDeletepr1
ReplyDelete<?php
$x=10;
$y=25;
$z=$x+$y;
echo "sum of $x+$y =".$z;
?>
This comment has been removed by the author.
ReplyDeletepro-05
ReplyDelete";
$c = $a - $b;
echo "Substraction Operation $c
";
$c = $a * $b;
echo "Multiplication Operation $c
";
$c = $a / $b;
echo "Division Operation $c
";
$c = $a % $b;
echo "Modulus Operation $c
";
$c = $a++;
echo "Increment Operation $c
";
$c = $a--;
echo "Decrement Operation $c
";
?>
pro-04
";
}
else
{
echo " a is not equal to b
";
}
if( $a > $b )
{
echo " a is greater than b
";
}
else
{
echo " a is not greater than b
";
}
?>
pr0-03
pto-02
";
echo $X;
echo "
";
echo $Y;
?>
pr3
ReplyDeletepto-02
ReplyDelete";
echo $X;
echo "
";
echo $Y;
?>
pr0-03
ReplyDeletepr4
ReplyDelete";
}
else
{
echo " a is not equal to b
";
}
if( $a > $b )
{
echo " a is greater than b
";
}
else
{
echo "a is not greater than b
";
}
?>
This comment has been removed by the author.
ReplyDeleteP. Inthuga
ReplyDeleteProgram 1
<?php
$x=10;
$y=25;
$z=$x+$y;
Echo "Sum of x+y = ",$z ;
print($msg.$z);
?>
".$x;
ReplyDeleteecho "
".$y;
?>
This comment has been removed by the author.
ReplyDeleteProgram - 01
ReplyDelete<?php
$x=10;
$y=25;
$z=$x+$y;
echo "Sum of x+y = ".$z;
?>
Program -02
ReplyDelete";
echo "$x
";
echo $y;
?>
This comment has been removed by the author.
ReplyDeleteprogram -03
ReplyDeleteprogram -04
ReplyDelete";
}
else
{
echo " a is not equal to b
";
}
if( $a > $b )
{
echo " a is greater than b
";
}
else
{
echo "a is not greater than b
";
}
?>
program -05
ReplyDelete";
$c = $a - $b;
echo "Substraction Operation : $c
";
$c = $a * $b;
echo "Multiplication Operation : $c
";
$c = $a / $b;
echo "Division Operation : $c
";
$c = $a % $b;
echo "Modulus Operation : $c
";
$c = $a++;
echo "Increment Operation : $c
";
$c = $a--;
echo "Decrement Operation : $c
";
?>
Program 4
ReplyDelete";
}else {
echo " a is not equal to b
";
}
if( $a > $b ) {
echo " a is greater than b
";
}else {
echo "a is not greater than b
";
}
Program 5
ReplyDelete";
$c = $a - $b;
echo "Substraction Operation : $c
";
$c = $a * $b;
echo "Multiplication Operation :$c
";
$c = $a / $b;
echo "Division Operation: $c
";
$c = $a % $b;
echo "Modulus Operation: $c
";
$a++;
echo "Increment Operation: $a
";
$a = 42;
$a--;
echo "Decrement Operation: $a
";
?>
Sharmila. S
ReplyDelete";
print($msg.$z);
?>
Sharmila. S
ReplyDeletePrograme 2
";
echo $x."
";
echo $y;
?>
Sharmila. S
ReplyDeleteProgram 3
Sharmila. S
ReplyDeleteProgram 4
";
}
else
{
echo"a is not equal to b
";
}
if( $a > $b )
{
echo"a is greater than b
";
}
else
{
echo"a is not greater than b
";
}
?>
Sharmila. S
ReplyDeleteProgram 5
";
$c = $a - $b;
echo "Substraction Operation : $c
";
$c = $a * $b;
echo "Multiplication Operation : $c
";
$c = $a / $b;
echo "Division Operation : $c
";
$c = $a % $b;
echo "Modulus Operation : $c
";
$c = $a++;
echo "Increment Operation : $c
";
$c = $a--;
echo "Decrement Operation : $c
";
?>
k.vijikaran
ReplyDelete01.
<?php
$x=10;
$y=25;
$z=$x+$y;
echo"sum of x+y=",$z;
print($msg.$z);
?>
2.
ReplyDelete";
echo $x;
echo "
";
echo $y;
?>
This comment has been removed by the author.
ReplyDelete4.
ReplyDelete";
}
else
{
echo"a is not equal to b
";
}
if($a>$b)
{
echo "a is greter than b
";
}
else
{
echo "a is not greter than b
";
}
?>
3.
ReplyDelete5.
ReplyDelete";
$c=$a-$b;
echo "Substraction Operation $c";
$c=$a*$b;
echo "Multiplication Operation $c";
$c=$a/$b;
echo "Divison operation $c";
$c=$a%$b;
echo "Modulus operation $c";
$c=$a++;
echo "Increment operation $c";
$c=$a--;
echo "Decrement operation $c";
?>