PHP Programming Debugging Code Assignment

 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

Post a Comment

48 Comments

  1. A.vithushalini
    pro:01
    <?php

    $x=10;
    $y=25;
    $z=$x+$y;



    echo"Sum of x+y =".$z;

    ?>

    ReplyDelete
  2. program 01 (N.Gothanya)





    <?php

    $x=10;
    $y=25;
    $z=$x+$y;

    echo" Sum of x+y = ",$z;



    ?>



    ReplyDelete
  3. A.vithushalini
    pro:02

    ";


    echo $x;
    echo"
    ";
    echo $y;
    ?>

    ReplyDelete
  4. program 4
    ";
    }
    else
    {
    echo " a is not equal to b
    ";
    }

    if( $a > $b )
    {
    echo " a is greater than
    ";
    }
    else
    {
    echo " a is not greater than b
    ";
    }


    ?>

    ReplyDelete
  5. A.vithushalini
    pro: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
    ";
    ?>

    ReplyDelete
  6. <?php
    //Program 1 Kipitha.J
    $x=10;
    $y=25;
    $z=$x+$y;

    echo ("Sum of x+y = ".$z);

    ?>

    ReplyDelete
  7. A.Vithushalini
    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
    ";
    }
    ?>

    ReplyDelete
  8. program 5
    ";

    $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
    ";
    ?>

    ReplyDelete
  9. $a = 42;
    $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
    ";
    ?>

    ReplyDelete
  10. This comment has been removed by the author.

    ReplyDelete
  11. pr1
    <?php

    $x=10;
    $y=25;
    $z=$x+$y;

    echo "sum of $x+$y =".$z;



    ?>

    ReplyDelete
  12. This comment has been removed by the author.

    ReplyDelete
  13. pro-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
    ";
    ?>

    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;
    ?>

    ReplyDelete
  14. pr4
    ";
    }
    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
    ";
    }
    ?>

    ReplyDelete
  15. This comment has been removed by the author.

    ReplyDelete
  16. P. Inthuga
    Program 1
    <?php

    $x=10;
    $y=25;
    $z=$x+$y;

    Echo "Sum of x+y = ",$z ;

    print($msg.$z);

    ?>

    ReplyDelete
  17. This comment has been removed by the author.

    ReplyDelete
  18. Program - 01
    <?php

    $x=10;
    $y=25;
    $z=$x+$y;

    echo "Sum of x+y = ".$z;



    ?>

    ReplyDelete
  19. This comment has been removed by the author.

    ReplyDelete
  20. program -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
    ";
    }
    ?>

    ReplyDelete
  21. program -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
    ";
    ?>

    ReplyDelete
  22. Program 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
    ";
    }

    ReplyDelete
  23. Program 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
    ";

    $a++;
    echo "Increment Operation: $a
    ";

    $a = 42;
    $a--;
    echo "Decrement Operation: $a
    ";
    ?>

    ReplyDelete
  24. Sharmila. S
    Programe 2

    ";
    echo $x."
    ";
    echo $y;
    ?>

    ReplyDelete
  25. Sharmila. S
    Program 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
    ";
    }
    ?>

    ReplyDelete
  26. Sharmila. S
    Program 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
    ";
    ?>

    ReplyDelete
  27. k.vijikaran
    01.
    <?php
    $x=10;
    $y=25;
    $z=$x+$y;
    echo"sum of x+y=",$z;
    print($msg.$z);
    ?>

    ReplyDelete
  28. This comment has been removed by the author.

    ReplyDelete
  29. 4.
    ";
    }
    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
    ";
    }
    ?>

    ReplyDelete
  30. 5.
    ";
    $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";
    ?>

    ReplyDelete