CHAPTER6-11.cpp
上传用户:fjc899
上传日期:2007-07-03
资源大小:187k
文件大小:0k
- //文件名:CHAPTER6-11.cpp
- #pragma warning(disable:4786)
- #include <iostream.h>
- #include <vector>
- #include <algorithm>
- using namespace std;
- void main (void)
- {
- vector<int> Scores;
- Scores.push_back(100);
- Scores.push_back(80);
- Scores.push_back(45);
- Scores.push_back(75);
- Scores.push_back(99);
- Scores.push_back(100);
- int NumberOf100Scores(0);
- NumberOf100Scores=count (Scores.begin(), Scores.end(), 100);
- cout << "There were " << NumberOf100Scores << " scores of 100" << endl;
- }