### Prime or Composite Number Calculation

Calculator test the entered number and tells that entered number is prime number or composite number. A prime numeral are those numbers which are divisible by itself and one, like 1, 2, 3, 5, 7...

And composite numeral are those numbers which has more than two factors like 4, 6, 8, 9 10 ..

**Explanations:**

__For Prime Number :__

We can take the example of 5, so we will divide 5 in steps as follows: $$\frac {5}{1} = 5 $$ $$ \frac {5}{2} = 2 \text { and 1 is left over un-divisible ( 2 x 2 = 4 and 5 - 4 = 1 left over).} $$ $$ \frac {5}{3} = 1 \text { and 2 is left over un-divisible ( 3 x 1 = 3 and 5 - 3 = 2 left over).}$$ $$ \frac {5}{4} = 1 \text { and 1 is left over un-divisible( 4 x 1 = 4 and 5 - 4 = 1 left over).} $$ $$ \frac {5}{5} = 1 $$ The 5 can be divided evenly by 1 and 5 so it is a prime number.

__For Composite number:__