fnet
高级会员

**村大队书记
UID 65788
精华
0
积分 718
帖子 785
金钱 718 喜悦币
威望 0
人脉 0
阅读权限 50
注册 2005-8-12
状态 离线
|
My first C++ programming
int main()
{
int num = 1;
vector<int> inumber;
for (vector<int>::size_type iy = 0;iy != 11;++iy)
{
inumber.push_back(iy);
}
for (vector<int>::size_type ix = 0;ix !=inumber.size();++ix)
{
//判断inumber[ix+1] ? ++ix : return inumber[ix]
if ((ix+1)<inumber.size())
{
cout<<inumber[ix]+inumber[ix+1]<<endl;
++ix;
}
else
{
cout<<inumber[ix]<<endl;
}
}
}
I think C++ is super power language in this world!
|  JAVA |
|