Why Open Source

Open Source is not a concept, it's thought process.

Showing posts with label Test. Show all posts
Showing posts with label Test. Show all posts

Monday, November 28, 2016

Print All Prime Numbers between 1-500 Using Java

Prime numbers are those numbers which do not have any factor except themselves. So any number which can't be divided by any other number except itself is a Prime Number. So, how do we identify Prime Numbers ? There are many ways to do so but as usual we'll go with the simplest and the easiest one. We are going to print all the prime numbers between 1 to 500. So how do we do it. Below is the code. This is how it works.  We just need to...