Prime Number Program Source Code
<html>
<head><TITLE></TITLE>
<script language="JavaScript">
var a=prompt("enter a value");
alert(a);
var c=0;
for(var i=2;i<a;i++)
{
if(a%i==0)
{
c=i;
//alert("Now C IS:"+c);
}
}
if(c==0)
{
alert("given no is prime");
}
else
{
alert("given no is not a prime");
}
</script>
</head>
<body></body>
</html>
}
--
http://www.venkatmails.blogspot.com/
Venkat Mails, Fun , Cool pictures, Fun messages, Sardar Jokes, Quotations Moral stories Fun stories
http://www.venkatmails.blogspot.com/
thanks
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteif(c==0)
ReplyDeletethis should be replaced by
if(c==a)
Presently engineers simply needed to program to a couple working frameworks approving it took a shot at them.Java
ReplyDeletePrime numbers are a special kind of natural numbers or positive integers which are exactly
ReplyDeletedivisible by 1 and the number itself or such as 2,3,5,7 and 11.
ReplyDeleteprime number distribution . (PNDS), developed by the NSI team of mathematicians2 which computes the exact count of primes numbers.
Great Article
ReplyDeleteB.Tech Final Year Projects for CSE in JavaScript
FInal Year Project Centers in Chennai
JavaScript Training in Chennai
JavaScript Training in Chennai