• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            /*  讀入一串字符(j個數,一行,間隔空格,輸入完回車),按空
            格(可間隔任意個)截斷為j個數字并用數組(長度剛好)存儲他們
            */
            /*  c++終結版 VS和DEV-C++編譯通過 */
            #include <iostream>
            #include <vector>
            #include <string>
            #include <sstream>
            using namespace std;
            int main()
            {
                string line;
                int num;
                vector<int> nums;
                getline(cin,line);
                istringstream stream(line);
                while(stream>>num)
                    nums.push_back(num);
                for(vector<int>::iterator iter=nums.begin();iter!=nums.end();++iter)
                    cout<<*iter<<" ";cout<<endl;
                system("pause");
            }


            /*讀入一行數c++精簡版
            #include <iostream>
            #include <vector>
            using namespace std;
            int main()
            {
                int temp;
                vector<int> nums;
                while(cin>>temp&&getchar()!='\n')/*弊病:輸入的末尾不可以是空格*/
                    nums.push_back(temp);
                nums.push_back(temp);
                for(vector<int>::iterator iter=nums.begin();iter!=nums.end();++iter)
                    cout<<*iter<<" ";
                system("pause");  
            }
            */

            Posted on 2007-07-22 15:49 小王子 閱讀(2157) 評論(0)  編輯 收藏 引用 所屬分類: 分類1:C++文章
            久久99久久成人免费播放| 亚洲国产精品无码久久一区二区 | 久久青青草原国产精品免费| 久久人人爽人人爽人人片av麻烦| 亚洲人成无码久久电影网站| 久久人人爽人爽人人爽av| 久久精品一区二区影院| 精品视频久久久久| 亚洲国产成人久久一区久久| 久久91精品国产91| 久久天天躁夜夜躁狠狠| 久久久久亚洲av无码专区喷水 | 一本一本久久a久久综合精品蜜桃 一本一道久久综合狠狠老 | 久久久无码精品亚洲日韩蜜臀浪潮| 亚洲国产精品嫩草影院久久| 色天使久久综合网天天| 久久精品亚洲日本波多野结衣| 国产欧美一区二区久久| 久久精品三级视频| 久久久国产打桩机| 久久免费视频网站| 亚洲国产成人精品无码久久久久久综合| 亚洲精品WWW久久久久久| 亚洲国产精品无码久久| 国产精品99久久久久久www| 欧美久久一级内射wwwwww.| 国产激情久久久久久熟女老人| 成人久久久观看免费毛片| 日韩欧美亚洲综合久久影院Ds | 久久国产高潮流白浆免费观看| 精品久久国产一区二区三区香蕉 | 久久综合久久自在自线精品自| 国产精品激情综合久久| 久久精品久久久久观看99水蜜桃| 国产精品久久久久久吹潮| 久久精品18| 996久久国产精品线观看| 一本一本久久a久久精品综合麻豆| 久久精品国产亚洲AV电影| 久久婷婷五月综合97色直播| 一本大道久久a久久精品综合|