執行 ❯
建立您
自己的
網站
×
更改方向
更改主題,深色/淺色
前往 Spaces
#include <iostream> #include <vector> #include <algorithm> using namespace std; bool greater_than_10(int value) { return value > 10; } int main() { vector<int> numbers = {1, 7, 3, 5, 9, 2}; if (none_of(numbers.begin(), numbers.end(), greater_than_10)) { cout << "None of the numbers are greater than 10"; } else { cout << "Some numbers are greater than 10"; } return 0; }
這些數字中沒有一個大於 10