Prime Number Generation
A positive integer greater than 1 is said to be prime if it has no divisors other than 1 and itself. A positive integer greater than 1 is a composite if it is not prime. Write a program that asks the user to enter an integer greater than 1 and prints the list of all prime numbers less than or equal to the number entered. Your program should use a predicate (function object or a lambda) that determines whether a given integer is composite. The program should generate the list of prime numbers less or equal to X by adding all positive integers greater than 1 to a vector and then using the remove_if function and the predicate to remove all composites from the vector.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.