7 comments:

  1. This comment has been removed by the author.

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

    ReplyDelete
  3. $num1=$_POST['n1'];
    $num2=$_POST['n2'];
    echo "The two numbers entered are: $num1 $num2";
    echo "
    ";
    if($num2==0||$num1==0)
    {
    echo "Demoninator cant be zero";
    }

    else if($num1>$num2)
    {
    $n=$num1/$num2;
    echo "The calculation is: ".$n;
    echo "
    ";
    }

    else if($num1<$num2)
    {
    $n=$num2/$num1;
    echo "The calculation is: ".$n;
    echo "
    ";
    }

    ReplyDelete
    Replies
    1. php
      $num1=$_POST['n1'];
      $num2=$_POST['n2'];
      if($num2==0)
      echo"division is not possible";
      else if ($num1>$num2)
      {$num=$num1/$num2;
      echo "$num";
      }
      else
      {$num=$num2/$num1;
      echo "$num";
      }

      Delete
  4. $num1=$_POST["n1"];
    $num2=$_POST["n2"];
    if($num1==0||$num2==0)
    {
    echo "Can't divide";
    break;
    if($num1>$num2)
    {
    echo $num1/$num2;
    }
    else
    {
    echo $num2/$num1;
    }

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

    ReplyDelete
  6. ?php
    $n1=$_post["num1"];
    $n2=$_post["num2"];
    if(n1>0 && n2>0)
    {if(n1>=n2)
    {$o=n1/n2;
    echo"output:"."$o"}
    else
    if(n2>=n1)
    {$o=n2/n2;
    echo"output:"."$o";}
    }else
    echo"program not accepted zero value";
    ?>

    ReplyDelete