C++ primer P94 练习3.17

来源:互联网 发布:贵阳大数据产业博览会 编辑:程序博客网 时间:2024/06/05 12:40
#include <iostream>#include <string>#include <vector>using namespace std;int main(){   vector<string> vec;   string str;   while (cin >> str){      vec.push_back(str);   }   for (auto &s : vec){      int j = 0;      while (j<s.size()){         s[j]=toupper(s[j]);         j++;      }      cout << s << endl;   }   return 0;} 

0 0
原创粉丝点击