1 comment:

  1. ?php
    $nos=$_POST["no"];
    $f=0;
    for($i=2;$i<=$nos/2;$i++)
    {
    if($nos%$i==0)
    {
    $f=1;
    break;
    }
    }
    if($f==1)
    {
    echo"$nos is not prime";

    }
    else
    {
    echo"$nos is prime";
    }
    ?>

    ReplyDelete