Computer Science, asked by aamizsameen, 1 year ago

write a java program to find the prime number between 1-100

Answers

Answered by nikita12354
2
hello friend here is your answer⬇⬇⬇

<html>
<head>
<title>prime number</title>
</head>
<body>
<script type="text/JavaScript">
for(var i=2; i<100; i++)
{
var prime=[];
for(var j=0; j<=i; j++)
{
var p=i % j;
}
if(p !=0)prime.push(i);
else continue;
}
for(var k=0; k< prime.length; k++)
{
document.writeln(prime[k], "<br>"
}
</script>
</body>
</html>

nikita12354: thankx for that
Similar questions