**
使用C++ STL标准模板库Vector容器写的等差数列计算器
//个人学习笔记有兴趣的可以翻阅
#include <iostream>
#include <vector>
#include <windows.h>
using namespace std;
vector<int> opnumber(100);//新建一个int类型的Vector容器
long sum;
void main()
{
cout << "====使用Vector的等差数列计算器====" << endl;
int inputnum, inputpublicerrand,ite;
do
{
cout << "输入一个等差数列的首项与公差,用空格键分开" << endl;
cin >> inputnum >> inputpublicerrand;
cout << "您要显示前多少项的和? 不可输入<=0的数,最大可输入到100" << endl;
cin >> ite;
opnumber[0] = inputnum;
auto pd = opnumber.begin();//迭代器pd
cout << "该等差数列首项为" << *pd << endl;//使用迭代器访问元素
for (int i = 0; i < ite; i++)
{
opnumber[i] = inputnum + i*inputpublicerrand;
cout << "第" << i + 1 << "项的值为(使用迭