(518 Views)

By definition, every integer greater than one is either a prime number or a composite number. A composite number is a positive integer number that is not prime number. In other words, it is a positive integer number which has at least one divisor other than 1 and itself. The composite numbers up to 20 are 4, 6, 8, 9, 10, 12, 14, 15, 16, 18, 20.

The first 100 composite numbers are 4, 6, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 22, 24, 25, 26, 27, 28, 30, 32, 33, 34, 35, 36, 38, 39, 40, 42, 44, 45, 46, 48, 49, 50, 51, 52, 54, 55, 56, 57, 58, 60, 62, 63, 64, 65, 66, 68, 69, 70, 72, 74, 75, 76, 77, 78, 80, 81, 82, 84, 85, 86, 87, 88, 90, 91, 92, 93, 94, 95, 96, 98, 99, 100, 102, 104, 105, 106, 108, 110, 111, 112, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 128, 129, 130, 132, 133

For example:

Input: 10

Output: yes, its Composite (Because 10 has divisors other than 1 and itself, for ex, 2 or 5).

Output: no, its not Composite (Because 5 is a prime number, as it has no other divisors other than 1 and itself). input: 23

output: no, its not Composite (Because 23 is a prime number, as it has no other divisors other than 1 and itself).

0 UpvotesUpvote |
0 DownvotesDownvote |

- Algorithm and Flowchart to Find transpose of a matrix [3379 Views]
- Implementation of Stack using Queue Algorithm and Flowchart [308 Views]
- Import Git project in Eclipse [701 Views]
- Inbuilt data structure in Python [121 Views]
- Python Slice Notation [223 Views]

- Algorithm to find whether number is Armstrong Number or Not [40208 Views]
- How To Win Ludo King Game Every Time [39334 Views]
- Jio Phone hang on LOGO problem Solution - Hard Reset Jio Phone [27644 Views]
- Knuth-Morris-Pratt (KMP) Substring Search Algorithm with Java Example [27544 Views]
- FlowChart and Algorithm to find Whether a Number is Even or Odd [20020 Views]