why did we have to divide the numbers in prime and composite numbers
Prime nos-Prime numbers are those who have 1 and themselves as their factors.
Composite Numbers : A Composite Number can be divided evenly by numbers other than 1 or itself.
For example: 9 can be divided evenly by 1, 3 and 9, so 9 is a composite number.