Prime Number Program in Java - LearnHowToCode SarkariResult.com Interview Questions and Answers LearnHowToCodeOnline
Prime Number Program in Java

Prime Number Program in Java


Prime Number Program in Java

class Prime
{
public staic void main(String[]args)
{

              // intializede variable
int primeNumber=10;
                 // ldata strore and hold for using that variable
  int temp=0;
         
for(int i=2;i<primeNumber-1;i++)
{
if(primeNumber%i==0)
{
temp=temp+i;

}
if(temp==0)
{
System.out.println("this not prime Number");
}
else{
System.out.println("this is prime Number");
}
}
}
}

About EasyToCode

I'm Ethan Mariano a software engineer by profession and reader/writter by passion.I have good understanding and knowledge of AngularJS, Database, javascript, web development, digital marketing and exploring other technologies related to Software development.

0 comments:

Featured post

Political Full Forms List

Acronym Full Form MLA Member of Legislative Assembly RSS Really Simple Syndication, Rashtriya Swayamsevak Sangh UNESCO United Nations E...

Powered by Blogger.