Problems
A prime number is a natural number greater than 1 that has exactly two divisors: 1 and itself.
A composite number is a natural number greater than 1 that is not prime; it has three or more divisors.
The number 1 is neither prime nor composite.
Write a program that, given 5 natural numbers, determines whether each number is prime, composite, or neither.
Input
Five natural numbers, each not exceeding 1,000,000,000, are given separated by spaces.
Output
For each input number, in the order given, print one per line:
"prime number"if the number is prime"composite number"if the number is composite"number one"if the number is neither prime nor composite (i.e., 1)
Example
3 10 1 55 127
prime number
composite number
number one
composite number
prime number
Tag
Source
jungol