Skip to main content

Find Prime No. Using Java Script

Find Prime No. Using Java Script

Find Prime No. Using Java Script

Java script has  very simple code for browser. Generally java script is used to restrict user. But you can learn java script by playing with coding.

Program:

var num =prompt("Enter a number");
parseInt(num);var i;var b=0; if(num==1)
{
alert("A prime number is a number which has only two factors, 1, and itself. But in the case of 1, there is only one factor: 1. So, 1 is not a prime number");
}
else{
for(i=1;i<=num;i++)
{
var result = num%i;
if(result==0)
{
b++;
} }
if(b<=2)
{
alert("Prime no.");
}
else
{
alert("Not Prime");
}
}

Comments

Popular posts from this blog

Join the Beauty Course for Massage Beauty License Training

Massage Beauty School of California: Massage beauty program is one of the top ten beauty courses which are well recognized and sought after in the beauty sector. Several students from various cities and states enroll in this training program to get better learning opportunities and understand the minute technicalities of beauty massaging services. Certified schools and beauty institutes located in Los Angeles are offering cutting-edge training to the students who are eligible for the program. Palace Beauty College is an accredited beauty school that does offer a massage therapy program and also offers holistic learning facilities to the students. The college has years of experience in providing massage therapy license training in Los Angeles for more than half a decade now. The college maintains its official website to reach out to distant students and provide them relevant information related to the available beauty courses. The college takes pride in its impressive infrastru...

Having issue with MDaemon Outlook Connector to connect MDaemon data with Outlook

Migration from MDaemon to Outlook is the right way to access MDaemon data in Outlook by using Outlook Connector Migration from MDaemon to Outlook Without Outlook Connector Migration from MDaemon to Outlook Overview: MDaemon Mail Server provides Outlook Connector for MDaemon which let you view and open MDaemon data with Outlook. Using Outlook Connector users will be able to view MDaemon Mail and contacts in Outlook. But if have you deleted any file from MDaemon then it will also missing from Outlook as well.   The way MDaemon Outlook Connector works is by keeping a locally cached copy file of the mail body in a database and the attach   files as a separate file. This is completely different from Microsoft Outlook Exchange caching where everything is kept in one OST file. The problem with this is it takes around 30 minutes to open Outlook (from a cold boot) which is quite unacceptable!! Sometimes users couldn’t able to send and receive email while using Ou...

How to Add MBOX File to Office 365 Manually

Read this article, if you need to know about how to add an MBOX file to Office 365 manually & alternatively. This MBOX to Office 365 migration article is created for such persons who would have a requirement to transfer MBOX file data to Office 365 and are facing trouble finding out the exact solution. In this article, we will explain the manual process but it is lengthy so users who have an urgent requirement and want to directly add MBOX files in Office 365 then they can also go with its alternative solution. Why Users go with Office 365 from MBOX   MBOX file format is supported by 25+ mail clients & webmail clients (Thunderbird, Mac Mail, The Bat!, Gmail, Mulberry, Postbox, PocoMail, SeaMonkey, Spicebird, Entourage, etc.) and Office 365 is more in demand than other mail clients because it is cloud-based and supports multiple programs. O365 is simply accessible at any location on any system by only internet connectivity. It is a business purpose cloud-based web app a...