hi i need a program for a prime no "whether a no is prime or not'

There are plenty of suggestions in existing threads, do a site search.

Oh, and read this.

1st of all.... welcome....

2nd of all we dont just give code...

the point of this forum is that you 1st try to code it yourself, and then AFTER research on the internet...and a search on the forum, then you post your problem here WITH your try... from there we will help you and not troll you :)

remember to see if a number is a prime number... it must only have exactly 2 divisors.... namely 1 and itself...

use that logic to figure out how you will do this

There is a formula for prime numbers, plug in a number in that formula and see what you get.

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.