can smby give me a simple example algorithm to determine whether the number is prime or not such as using while loop, if.....then......else or others which is simple(adsbygoogle = window.adsbygoogle || []).push({});

thanx

**Physics Forums | Science Articles, Homework Help, Discussion**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Homework Help: Determine prime number

**Physics Forums | Science Articles, Homework Help, Discussion**