:rolleyes: I need some one to define prime numbers for me
A full definition, I am trying to write a program to determine wether a number is prime, print all prime numbers in a specific range ... e.t.c so i need a full definition of prime numbers, i know prime numbers are divisible only by one and theirselves, and when i remove all odd and even numbers from a set of numbers, i will be left with prime numbers.....
i think if i know more about prime numbers i can come up with something more.....

so i need someone to help

:rolleyes: I need some one to define prime numbers for me
A full definition, I am trying to write a program to determine wether a number is prime, print all prime numbers in a specific range ... e.t.c so i need a full definition of prime numbers, i know prime numbers are divisible only by one and theirselves, and when i remove all odd and even numbers from a set of numbers, i will be left with prime numbers.....
i think if i know more about prime numbers i can come up with something more.....

so i need someone to help

I assume you are talking about whole numbers. If you remove all odd and even numbers from a set of numbers you have nothing left! However you can safely remove the number 1 and all even numbers. The rest of the numbers you have to test with the modulus operator to see if they leave a remainder. It's up to you to do this in an elegant loop.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.