can i find the prime number using square root function and
tell me how can i generate the prime numbers

I did a project earlier this semester involving prime numbers. I used the modulus operator to determine whether the numbers were prime. A prime number is only evenly divisible by one and itself. If it is evenly divisible by any other number, then it is not prime. Think about how you implement the modulus operator in a loop to determine if a number is prime.

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.