INPUT:
<html>
<head><h1> Check whether the numbers are prime or not .</h1></head>
<body>
<H1>
<?php
$c;$sanket;$x;
for($x=2;$x<=100;$x++)
{
$c=0;
for($sanket=2;$sanket<=($x/2);$sanket++)
{
if(($x%$sanket)==0)
$c++;
}
if($c==0)
{
echo $x." is a prime number<br>";
}
else
{
echo $x." is not a prime number<br>";
}
}
?>
</h1>
</body>
</html>
No comments:
Post a Comment