📄 count.cpp
字号:
// count.cpp
// counts the number of objects with a specified value
#include <iostream>
#include <algorithm> //for count()
using namespace std;
int arr[] = { 33, 22, 33, 44, 33, 55, 66, 77 };
int main()
{
int n = count(arr, arr+8, 33); //count number of 33's
cout << "There are " << n << " 33's in arr." << endl;
return 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -