Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- int n, x;
- cin >> n >> x;
- auto is_less = [&](int number) {
- return number < x;
- };
- for (int i=0; i<n; i++) {
- int num;
- cin >> num;
- if (is_less(num)) {
- cout << num << ' ';
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement