eguruchela

Prime or Composite Number Calculator


The calculator determins entered number is Prime number or composite number.


 

 

Calculator test the entered number and tells that entered number is prime number or composite number.

Prime Number

A prime numeral are those numbers which are divisible by itself and one, like 1, 2, 3, 5, 7...

List of prime numbers 1 to 100)

2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97.

Composite Number

The 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 lef tover un-divisible} $$ $$ \text { (2x2 =4 and 5-4 =1 lef over).} $$ $$ \frac {5}{3} =1 \text { and 2 is left over un-divisible} $$ $$ \text { (3x1 =3 and 5-3 =2 left over).}$$ $$ \frac {5}{4} =1 \text { and 1 is left over un-divisible} $$ $$ \text { (4x1 =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:

We can take the example of 27, so we will divide 27 in steps as follows: $$\frac {27}{1} = 27 $$ $$ \frac {27}{2} =13 \text { and 1 is left over un-divisible } $$ $$ \text { ( 13x2 =26 and 27 -26 = 1 left over).} $$ $$ \frac {27}{3} =9 $$ $$ \frac {27}{4} =6 \text { and 3 is left over un-divisible} $$ $$ \text { ( 6x4 =24 and 27-24 =3 left over)} $$ $$ \frac {27}{9} =3 $$ $$ \frac {27}{27} =1 $$

The 27 can be divided evenly by 1,3,9,27 so it is a composite number.